Submitting to the iOS App Store

From NSB App Studio
Jump to navigation Jump to search

Preparing your App

In this TechNote, we'll cover what you need to do to submit your app to Apple's iOS App Store.

Apple is concerned that apps in its store work as described and do not cause any security risk. They also care that the apps provide some unique functionality and follow their Human Interface Guidelines. The results have been good: Apps in the iOS App Store are usually pretty good, and the store is now one of the largest software resellers on the planet.

The method used will be to take an AppStudio app, use VoltBuilder to produce a .ipa file, then submit that to Apple.

Start by testing your app as much as possible while it is still a web app. It will be much easier to make changes, fixes and improvements at this stage.

Also, have a look at this list of common reasons apps are rejected: https://developer.apple.com/app-store/review/rejections/

Get Signing Certificates

For security purposes, Apple has a strong signing process. This involves certificates which identify the developer, which need to be included in the build process. Apple issues these certificates as part of its developer program.

Apple has good instructions on its website about its policies, procedures and how to get the certificates. This is probably the most complex and confusing part of submitting an app, so it's good to pay attention carefully. Don't be discouraged: hundreds of thousands of developers have gone through it successfully.

1. Sign up for an iOS Developer Account

Enroll as enroll as an iOS Developer to submit apps to the App Store. It costs $99.00 USD per year.

2. Set up your information in the iOS Provisioning Portal

Sign on using your Apple ID and go into the Certificates, Identifiers & Profiles. You'll see tabs under iOS. Your account needs to have admin privileges.

These are the important ones for AppStudio developers:

App ID

Next, choose App IDs in the Identifiers section. Click on the Plus (+) to add a new App ID.

For App ID Description, enter the short name of your app. You will want to use this consistently.

Don't check anything in App Services for now.

For App ID Suffix, choose Explicit App ID. The Bundle ID should be your domain name (in reverse) followed by your app name.

 com.nsbasic.sampleapp

If everything is correct, Submit it.

Certificates

The Development certificate identifies you and your development computer. Start by clicking on the Plus (+) button to add a new certificate.

Choose iOS App Development Certificate.

Instructions will then display telling you how to create a CSR file. The easiest way to do this is to use VoltSigner. The next screen uploads the CSR file - do that as well and click Generate.

Once the file is generated, Apple's website will instruct you to download the certificate. Once you do that, use the Certificate Wizard to make your p12 file. Put that file in your project's certificates folder.

Devices

Next, set up the list of devices you will be using. This list will be built into the Provisioning Profile. Your test build will only run on the devices listed. You can list up to 100 devices. They can be iPod, iPads or iPhones.

It will ask you to Assign a new Apple Device. This is the device you will use for your testing. You will need to enter a description on the device ("Bill's iPhone 5") and the Device ID. Get the Device ID (UDID) from your device. In the Summary screen, click on "Serial Number" and it will change to "Identifier (UDID)". Right click on it to copy it and paste it into the Devices screen.

Provisioning Profiles

A Provisioning Profile is a file which tells the App Store which devices your app may be installed on. A Distribution Provisioning File is used for the App Store. Use a Development Provisioning File for testing.

To create one, go into Provisioning Profiles and click on the plus ("+") button. Choose iOS App Development for testing. Your App ID should show up on the next screen - click on Continue. Next, select your Certificate, then the devices to be included (there is a handy Select All button). Finally, give the profile a name like sampleapp.development. The Provisioning Profile is then created and you can download it and save it in your app's certificates folder.

VoltBuilder

VoltBuilder is a web service which takes your project and returns a file which can be uploaded to the App Store.

To use it, you will need to create your own account with them. There is both a free and a paid plan.

Once you have the account, enter its name and password into Preferences.

Config.xml

One of the project properties is named configxml. This is used to create the config.xml file which is passed to VoltBuilder. It contains much of the information that VoltBuilder needs to create your app. The default configxml file will work, though you may wish to do some customization. It's worth consulting Cordova's config.xml documentation to see all the options.

Here is a sample config.xml (subject to change):

<?xml version="1.0" encoding="UTF-8"?>
<widget 
xmlns = "https://www.w3.org/ns/widgets"
id = "com.nsbasic.{id}"
versionCode = "{phoneGapBuildCounter}"
version = "{version}">

<name>{title}</name>
<description>{description}</description>

<icon src='{icon}' />
<preference name='SplashScreenDelay' value='2000' />
<preference name='AutoHideSplashScreen' value='true' />
<plugin name='cordova-plugin-splashscreen' source='npm' />

<preference name="permissions" value="none"/>
<!-- sample preference specifications -->
<!-- <preference name="autorotate" value="false" readonly="true"/> -->
<!-- <preference name="orientation" value="default" /> -->
<!-- <preference name="fullscreen" value="true" /> -->

<plugin name="cordova-plugin-statusbar" source="npm" />
  <preference name="StatusBarOverlaysWebView" value="{phoneGapStatusBarOverlay}" />
  <preference name="StatusBarBackgroundColor" value="{phoneGapStatusBarColor}" />
  <preference name="StatusBarStyle" value="{phoneGapStatusBarStyle}" />

  <allow-navigation href="*" />
  <access origin="*" />
  <allow-intent href="*" />
</widget>

Fields which are surrounded by brackets, like {version}, are automatically filled in by AppStudio from the other information in the project.

If you do not supply an icon, the default AppStudio icon will be shown.

iOS Splash Screens

According to Apple's application guidelines, a tablet (iPad) application should not hide the status bar while a handheld (iPhone) application should hide status bar.

The above dimensions are assuming that you have chosen to follow this recommendation. If you choose a different path, then you should increase or decrease the image height based on the size of the status bar.

An iPhone app should include one launch image in portrait orientation; an iPad app should include one launch image in portrait orientation and one launch image in landscape orientation.

If you do not supply a splash screen, the default splash screen will be shown.

Signing Keys

To properly build for the App Store, a Certificate and a Provisioning file are required. To set them up in your project, follow the VoltBuilder instructions.


Doing an Adhoc Build

An AdHoc Build can only be run on designated devices. It is designed for testing, not for release.

  1. In AppStudio, choose "Build Native App with VoltBuilder" in the Run menu. This will upload your app to VoltBuilder's servers so it can be packaged.
  2. Use the QR Code to install it on youdevice. It should appear on the Home screen.
  3. If the app is already installed on the device, you will have to delete it from the device before syncing the app.

Submitting your App

Set up your app in App Store Connect

App manages your apps in the App Store. There are a number of steps that need to be done in it before an app can be submitted.

Contracts, Tax and Banking

There are a number of contracts that need to be agreed to before you can submit. If you want to sell your app, you also need to supply banking information so payments can be direct deposited. Tax documents may also need to be filed.

Some of this paperwork cannot be done electronically. Expect to spend up to a month completing all of this if you are selling your app.

Other than that, the procedure is straight forward: follow the process on the website.

Manage Your Apps

Use Apps to add, view, and manage your App Store apps.

Before adding an app, collect the information you will need for it. Some of the fields you need to enter can only be set up when adding a new app: they cannot be changed later. Other fields can be changed later, but will trigger a review of your app. There are helpful prompt icons beside each field to help you with the input.

For more information on setting up fields, read "Adding New Apps".

The Bundle ID Suffix should contain your company name and the app name:

com.nsbasic.Project1

This needs to match the id field in the configxml project property. If the project's save file name is Project1, it will look like this:

id = "com.nsbasic.{id}"

Get Ready for Submission

  1. From your Version Details page, click the Ready to Upload Binary button.
  2. Follow the instruction on the screen.
  3. When complete, you will be able to upload the binary using the Application Loader.
  4. If you want to upload again, you will need to repeat these steps.

Upload to the App Store

VoltBuilder will upload your app to the App Store as part of the build.

For this to work, you need to set the appStoreAccount and appStoreAppPassword fields in Project Properties, in the VoltBuilder and Cordova section.

Follow these instructions to get the value for these fields.