Xcode debug build vs release build

感情迁移 提交于 2021-02-02 09:15:07

问题


I am currently building a react native app using expo.

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

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.

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

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

How do I get these to sync up and have the release build recognize the changes I make as I am certain I do not want to push a debug build to the app store?

Things I have tried:

  • Removing/cleaning Build folder and rebuilding
  • Updating Xcode
  • Running on another device
  • Building/running with expo (this did something, but it just causes the app to crash, assuming it is because of the cocoapods)

Versions:

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

Thank you


回答1:


I have fixed the issue.

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.

EDIT: 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.



来源:https://stackoverflow.com/questions/61309819/xcode-debug-build-vs-release-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!