Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
349 views
in Technique[技术] by (71.8m points)

ios - Xcode debug build vs release build

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...