Publish NativeScript to iOS Apple App Store

My latest couple of “native” mobile apps have been made with NativeScript. As a web developer who is already familiar with JavaScript and CSS, I’m really enjoying it. I always seem to forget the exact steps to follow once it’s done and I’m ready to submit it to the Apple App Store. Here’s my cheat sheet on the steps to follow:

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.

Image for post
Here, the app name is called “remindmeto”

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.

Image for post
You’ll see an error related to the “Signing”. Fix that first by changing the contents of the “Team” drop down.

Change “iPhone” (or whatever the device is) to “Generic iOS Device”.

Image for post
This is the original/default (bad) instance. See how it’s made for an “iPhone”?
Image for post
Change it 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.

Image for post
Change your “Bundle Version” for additional uploads to the app store

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!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store