Run release build version using cordova iOS - 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.

Related

Does expo-dev-client build auto reload?

I'm trying to use expo-dev-client to develop my app. The app hasn't contained native dependency yet.
After following the set up in the Expo document, I lasted run the command '''eas build --platform ios --profile preview'''. It built an app. Then I installed the app on my IOS simulator. (I haven't registered my iPhone to ad hoc).
The app now has the newest source code. But after editing and saving new source code, the app installed on the simulator didn't update.
So, does expo-dev-client build auto-reload? Or how to update the newest code to the installed app on my IOS simulator?
No, you have to re-build it when you have a new release.
I recommend checcking https://docs.expo.dev/workflow/publishing/
You can see the changes when the code isn't builder with the simulator

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.

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

Can we use the legacy build system for react native ios in Xcode 10.1?

I was using xcode 9.4 for react native 0.55 in production. But apple keeps sending mail each time a build is submitted to appstore, forcing the xcode update for the latest ios 12 sdk.
I updated xcode and solved the bugs I was getting during a local build following this blog post. The build is successful running from xcode locally.
However, the build is failing in circle-ci and the glog script that I run doesn't work for some reason.
So, I want to ditch the new build system and go back to the legacy build system.
Is it okay to release a build with legacy build system? I've heard that the new build system helps for faster builds with swift code. I don't have any swift code and want to push an update immediately to the appstore.
This update is a blocker.

Upload cordova app to the Apple store with Xcode 10

I noticed that Cordova is not compatible with the latest version of Xcode 10. To test the app I use this command:
cordova run ios --buildFlag='-UseModernBuildSystem=0'
and it works all correctly. I would like to know if it is possible to load applications built with the old Xcode system on the app store.
Using XCode legacy build system works completely fine when uploading to the AppStore. I still maintain an ionic 1 project that way.
Also, might I suggest checking out the release notes on the new build system which might answer some of your questions: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10

Resources