Search code examples
iosxcodereact-nativecocoapodsexpo

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


Solution

  • 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.