Xcode 调试版本与发布版本 [英] Xcode debug build vs release build

查看:34
本文介绍了Xcode 调试版本与发布版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 expo 构建一个 React Native 应用程序.

I am currently building a react native app using expo.

但是,我需要使用 cocoapods,这就是我现在使用 Xcode 的原因.

However, I needed to use cocoapods, which is why I am now using Xcode.

自从我切换到 Xcode 后,我的本地调试版本(我运行到 USB 连接的 iPhone)与推送到 TestFlight 的版本之间存在差异.

Since I have switched to Xcode, there has been a difference between my local debugging builds (that I run to a USB connected iPhone) vs the builds that get pushed to TestFlight.

经过一番挖掘,我发现这可能是由于 调试与发布方案.

After doing some digging I have found that it may be due to the debug vs release schemes in Xcode.

从我所看到的看来,差异应该只是在性能上、文件大小和其他一些方面,但不是应用程序实际执行和显示的内容,就像我的情况一样.

From what I've see it seems that the difference should really just be in performance, file sizes, and some other aspects, but not what the app actually does and displays like in my case.

为了测试,我在我的应用程序主页上进行了更改,只添加文本UPDATED.

To test, I made a change on my app's homepage to simply have the text, UPDATED.

正如预期的那样,当使用调试方案运行时,UPDATED 文本会出现,但是当使用发布方案运行时,它不会出现.

As expected, when ran with the debug scheme, the UPDATED text shows up, but when ran with the release scheme, it does not.

如何让这些同步并让发布版本识别我所做的更改,因为我确定我不想将调试版本推送到应用商店?

我尝试过的事情:

  • 删除/清理构建文件夹并重建
  • 更新 Xcode
  • 在另一台设备上运行
  • 使用 expo 构建/运行(这做了一些事情,但它只会导致应用程序崩溃,假设是因为 cocoapods)

版本:

  • react-native: 0.61.5
  • Xcode:11.4.1
  • macOS:10.15.3

谢谢

推荐答案

我已经解决了这个问题.

I have fixed the issue.

我发现通过在终端中运行 expo publish 然后在 Xcode 中使用发布存档方案进行构建,它会注意到更改.

I found that by running expo publish in the terminal and then building with the release archive scheme in Xcode, it notices the changes.

现在为什么需要(也许不需要),我不确定.

Now why that is required (maybe it isn't), I am unsure of.

如果有人有任何额外的见解,将不胜感激.

If anyone has an any additional insight, it would be greatly appreciated.

所以当我运行 expo publish 时,它会更新 app.bundleapp.manifest.这必须是 release 方案在构建时所考虑的.

So it looks like when I run expo publish it updates the app.bundle and app.manifest. This must be what the release scheme looks at when building.

这篇关于Xcode 调试版本与发布版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆