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

查看:69
本文介绍了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.

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

我尝试过的事情:

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

版本:

  • 反应本机:0.61.5
  • Xcode:11.4.1
  • macOS:10.15.3

谢谢

推荐答案

我已解决此问题.

我发现,通过在终端中运行 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.bundle app.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天全站免登陆