Xcode debug build vs release build - ios

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

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.

Related

iOS - Flutter audioplayers plugin error on xcode (Not found) on Release mode

When I test it on iOS Simulator on debug mode, it works fine but when I try to run on release mode on XCode it give me the following error:
Module 'audioplayers' not found
I use audioplayers 0.18.3
I remove the Pods and reinstall but not effect in release mode. Don't have problem with archive the app so is very strange. Need take screenshots of the app (in release mode, without debug banner) and I don't have a physical iOS device, so the only solution for me is take screenshots from iOS Simulator in release mode, but have this problem
Error Screenshot
PD: I'm running the .xcworkspace file.
PD2: I'm running flutter build ios and open xcode (.xcworkspace file), and run 'clean build folder' but the error persist
PD3: Sorry my bad english
Thanks since now!

What exactly does Flutter build iOS do? Is this really necessary?

I would like to fully understand this command and what happens behind the scenes. Here are a few pieces of information I've understood so far but somehow I cannot connect the dots:
When deploying an iOS we need to go through these steps:
build a flutter app in release mode, which will make an .app file/folder
archive & sign the .app file which will convert it into .ipa
send the signed .ipa to the appstore
flutter apps can have 3 modes: 1. debug 2. release 3. profile
running flutter build ios creates a build/ios folder, including the Release-iphoneos/Runner.app
Xcode creates its own .app in ~/Library/Developer/Xcode/DerivedData/Runner-...
Now, questions:
Is the build/ios/Release-iphoneos/Runner.app that Xcode converts into .ipa? I'm asking since I know that Xcode creates its own .app in ~/Library/Developer/Xcode/DerivedData, so I'm not sure if Xcode just copies build/ios/Release-iphoneos/Runner.app in here: ~/Library/Developer/Xcode/DerivedData/ or not
What happens if I don't run flutter build ios before? Will Xcode use only a debug mode of my app? If so, how come it removes the debug flag in the upper right corner?
When I clean my build folder in Xcode (shift+cmd+K) and then I archive the app and it will still build a new .app and then it converts it to .ipa. What mode was this .app created in? Was it a release app? If so, again, why is it necessary to run flutter build ios before and why not just archive it from the Xcode?
Thanks to everyone who tries to unleash this big mystery for me and for everyone else wondering.
The reason you should run a flutter build ios before archive is because archive uses the last build configuration from the results of running flutter build ios.

React Native iOS Build in Release configuration freezes on Launch Screen

I have an application built using React Native 0.58.6. The iOS build works fine in Debug configuration, but not when built in Release configuration. I can reproduce this on our build server and also locally using react-native run-ios --configuration Release.
This app worked previously in Release configuration before upgrading RN version. Does anyone have any tips for how to find out more information about what may be going on or how to fix this? The app does not crash or show any errors, just stays stuck on the LaunchScreen.xib.
Edit 1
The build works and progresses past the loading screen in the following configurations: Android/Debug, Android/Release, iOS/Debug. It is only the iOS/Release build that is failing. Also, we've tried various xCode versions including 10.1, 10.2, and 10.2.1. Still getting the same result with each version of xCode.
Any tips on how to debug something like this? With no crash, we aren't getting crash reports, and since it's a release build there is no debugging capability or console logging.
If you are using react-native-splash-screen you maybe forgot to hide it.
import SplashScreen from 'react-native-splash-screen'
...
SplashScreen.hide();

Installing on Iphone gets stuck after setting up firebase_messaging

Following the Readme of the https://github.com/flutter/plugins/tree/master/packages/firebase_messaging I set up the IOS and Android firebase. On Android it works but when I try to install the app by running "flutter run" on IOS, it gets stuck at installing it and I can't open it.
After I took the screenshot a new line appeared under "Installing and launching", "Configuring firebase for this app..." (or something like this).
I tried deleting the pods and set up again.
I tried deleting the app so it can be installed again.
I that at some point during the "Installing and launching..." the app tries to open but closes back immediately. Is it a crash? How do I get some sort of info regarding this? Thank you!
check these two things:
For iOS, the firebase_messaging functionality only works on real devices, it doesn't work on the simulator. (it does work in Android emulator)
Run open -a xcode ios/ and try to build the app there (⌘R), there will be more details on possible errors, specially regarding filling in the Signing section. Even if it's not signing, you will find out what it is, and after fixing it, the flutter cli will resume running without issues.

Run release build version using cordova iOS

I want to test the release build version on my iOS device directly using this command:
cordova run --buildConfig=build.json ios --release --device
But not working, is anybody here manage to test the release build version running on device? Thanks in advance.
Or let say the worst case, we can't do it. Is there any guarantee that below command:
cordova build --buildConfig=build.json ios --release
will build the release version of our app, when we open the xcode project on xcode?
My point is I need to get the release version build by cordova, not by Xcode.
Likely not guaranteed, but that's just a guess.
I'm not sure why you need Cordova to put together a release build—in order to submit to the app store you will want to use Xcode to archive your app. I have no idea if Cordova can do a proper archive but personally I wouldn't rely on it because at least Xcode should be up to date on what Apple demands from the build. Especially with automatic code signing. Cordova may lag in its implementation when Apple changes things.
One little thing, when a .ipa is signed for distribution through the app store, you cannot side load it onto a device. You can only side load .ipas that are signed for development.

Resources