Part 1 of 2: Prepare the app in NativeScript
After you’ve built your app, run the following commands in the Command Line / Terminal:
Yes, even though you’ve already run the platform add/remove to test it on your physical phone, I recommend doing this again anyways.
Part 2 of 2: Upload your iOS app to the App Store
Warning: do not run your app in XCode (using the emulator or on your phone). Doing so caused everything to break for me. Once you know it works on your phone via NativeScript / Command Line Terminal, just follow these steps!
Open your project in XCode (in your project’s folder, it’s in the /platforms/ios directory), and go to the general settings to update the “Signing”. Do this by clicking on the left-most icon in the top-left corner, then the name of your app.
In the “General” section, you need to update the “Team” in the Signing. This assumes you already have a certificate in the iTunes Connect Developer site.
Change “iPhone” (or whatever the device is) to “Generic iOS Device”.
In the XCode menu at the top of the screen: Product >> Analyze
You may see some errors (as indicated at the top). For example, Apple may have introduced new requirements for additional default screenshots and icon sizes. Fix these first. Note: you may not be able to (or have to!) fix all of the errors.
In the XCode main menu: Product >> Archive
In the new window, with your archive selected, hit the “Validate” button in the right-hand pane. Proceed through that process.
- I checked the box for “Upload your app’s symbols to receive symbolicated reports from Apple”
- I did “automatically manage signing” when prompted
At one point I received this error:
Redundant Binary Upload. You’ve already uploaded a build with build number ‘1.0’ for version number ‘1.0’ …
In which case, delete the archive, go back to the main window. Similar to going to the “General” Settings, go to the “Info” tab. There’s an option there for “Bundle Version” which you can change.
Once you have successfully validated your app, hit the button for “Upload to App Store…” in the right-hand pane of that same “Archives” screen. Proceed through that process. I made the same selections as I did when “validating.”
You’ll get an email saying that Apple received your app (it “has completed processing”). Then you can log into iTunes Connect and specify the “bundle” that you just uploaded.
Then proceed through the rest of the the App Store process. Good luck!