DEV Community

Ishwar398
Ishwar398

Posted on

Publishing your Xamarin app to Apple Store

1 Introduction

Cross platform mobile application development is a growing phenomenon due to its single code approach. Development of cross platform application with these new technologies is quick, but what matters more is how the apps that are developed on a single code base can be published to the respective application stores, what all kinds of testing is required for it and many more. This paper helps to cover these topics which will be useful to test single code base Applications before they are published to the App Stores.

2 Submitting an iOS application

2.1 Preparing an application for release

2.1.1 Set up AppID and Entitlements

An AppId is needed for submitting an application to Apple App Store. AppId is unique for every iOS App. Every AppId is associated with a set of entitlements. To generate an AppId, follow the below process.

  1. Login to Apple Developer Portal and click on ‘Certificates, IDs and Profiles’.

Login to Apple Developer Portal

  1. Click on the ‘Identifiers’ option from the side menu and Click the Add button.

Identifiers

  1. Select ‘AppId’ from the list and click on ‘Continue’. Give a ‘BundleID’ and Description in the required boxes.

AppId and BundleId

  1. Select the ‘Capabilities’ from the list below. Capabilities are defined as the permissions to the application to the services provided by Apple like CloudKit, In-App purchases etc.

Capabilities

2.1.2 Set up App Store Provisioning Profile

Provisioning profile is used to control how the application is deployed. A developer can create profiles like Alpha, Beta and Production to have an efficient release of the application to a selected set of people. To create a Provisioning Profile, click on the Profiles option in the side menu.

Set up App Store Provisioning Profile

Click on the ‘+’ icon to create a new profile. On the next screen, select ‘iOS App Development’ radio button. In the Distribution section, there are various options.

*1. Ad Hoc: *
This option can be considered as Beta release where the build is only available for a limited number of registered devices.

2. Developer ID:
This option can be considered as Alpha release where the build is only available for devices with same AppleID signed devices.

3. App Store:
This option can be considered as Production release, as the build is available on the App Store and can be accessed by the public.

Register a new profile

2.1.3 Prepare the set up for building the application

After the development stage of the application is complete, the next step is to publish the app to App Store. Building an iOS app requires a Mac Book or a Mac Build Host setup. This is required because building Native iOS requires Apple’s Build tools which only is compatible with Mac.

2.1.4 iOS Build Configuration

Considering Visual Studio as the IDE, right click the Project Name and click properties. Navigate to the iOS build tab.

  1. Set the Configuration to ‘Release’ and Platform to ‘iPhone’.

Build Configuration

  1. If the app is targeted to a specific SDK version, select it from the dropdown, else keep it ‘Default’.

SDK Version

  1. Linker behavior is the property which helps in reducing the size of the application by deleting the unused code. Mostly, this should be set to ‘Link Framework SDKs only’ to avoid any issues with third party libraries.

Linker

  1. The targeted architecture is to be selected in the ‘Supported Architecture’ dropdown. All apps targeted to iOS11 and above need to support 64-bit architectures.

Targeted Architecture

  1. LLVM (Low Level Virtual Machine) compiler can be used to build smaller and faster code. This increases the compile time of the application.

  2. Optimize PNG images can be checked to further reduce the size of the application

2.1.5 iOS Bundle Signing

  1. Click on the ‘iOS Bundle Signing’ option from the side menu.

IOS Bundling stage

  1. Set the configuration to ‘Release’ and Platform to ‘iPhone’.

Release Platform

  1. Select the ‘Manual Provisioning’ radio button in the Bundle Signing Scheme. Selecting this option enables to manually map the Generated AppId from the Developer Account portal to the application.

  2. In the ‘Manual Provisioning’ section, set the ‘Signing Identity’ as ‘Distribution (Automatic)’.

Signing Identity

  1. Select the ‘Provisioning Profile’ wherein the application is to be released.

Provisioning Profile

  1. Save the configuration and close it.

2.2 iTunes Connect

iTunes connect is a suite of web-based tools provided by Apple for managing iOS Applications on the App Store.

2.2.1 Configuring an App in iTunes Connect

Create a new App on iTunes connect using the ‘+’ button.

iTunes Connect

Upon clicking the ‘+’ button, a prompt asks for information as below:
a. Platform: iOS / tvOS
b. Name
c. Primary Language of the Application
d. Bundle ID
e. SKU (Unique Identification for the app)
f. User Access (Choosing the audience)

Platform

2.2.2 Provisioning an App for App Store Distribution

Irrespective of the release plan, a Distribution profile is needed for releasing an app to App Store. This profile allows the application to be digitally signed for release so that it can be installed on an iOS device. A Distribution Profile contains the following things.

  1. App Id
  2. Distribution Certificate

2.2.2.1 Creating a Distribution Certificate

Click on the ‘Certificates, Identifiers and Profiles’ Section on the side menu. Then select ‘Certificates’ from the side menu and click ‘+’ button.

Distribution Certificate

Select the ‘iOS App Development’ in the Software Section.

iOS App Development

Also select the services that are being used by the application.

services

2.2.2.2 Creating a Certificate Signing Request (CSR)

Certificate Signing Request is created using the Keychain Access tool on Mac. In the dropdown menu, click Keychain Access > Certificate Assistant > Request Certificate from a Certificate Authority.

Certificate Signing Request (CSR)

Enter the Email ID and name associated with the Apple Account and check ‘Save to Desktop’ and click continue.

Apple Account login

Once the CSR certificate is created, upload the certificate to Apple Developer Account page and click on Generate.

CSR certificate

Download the certificate and install it. Once the certificate is installed, the app can be published to the App Store.

2.2.3 Publish and Submit the App to App Store

  1. When all the release and build configuration is complete, set the Solution Configuration to Release and Solution Platform as iPhone.

Release

  1. From the Build menu, select Archive. Archive Manager will pop up. Once the archive is created click on ‘Distribute’.

Build Menu

  1. After clicking Distribute, Publishing Wizard will open. Select the desired Distribution Channel and fill the identity details and Provisioning Profile name.

Distribute

  1. Click on ‘Upload to Store’. A prompt will ask for Apple ID and Password. Fill in the ID and Password and click ‘OK’. The app will start to upload to App Store.

Credentials

  1. Once the upload is complete, login to iTunes and select the app. It will show the status as ‘Waiting for review’ with version details.

Versions

2.2.4 Managing App Screenshots

For publishing an app, App Store requires a set of screenshots and videos (optional). The screenshot consist of actual views of the application running and showing the unique features. Apple requires screenshots for every screen size and resolution that the application supports.

Top comments (0)