Deploy your iOS App on App Store without a Mac

Vincent Delacourt
5 min readMar 17, 2019

With React-Native and Visual Studio App Center

Windows with XCode on the cloud

Most people think that it’s impossible to deploy an app to Apple Store without having a Mac but with VS App Center we can use XCode on the cloud and deploy our App to the App Store

If you want to deploy to App Store, you need your app to be deployed with a REAL MAC FOR THE FIRST TIME. Then you can use VS App Center to deployed it (CI & CD)

Requirements

As we don’t have a Mac, we will develop our React-Native App with Windows and Android.

Of course, you still need an Apple Developer Account https://developer.apple.com/programs/enroll/

Follow the instructions here to start your App with React Native CLI Quickstart for Windows and Android https://facebook.github.io/react-native/docs/getting-started

Choose CLI, Windows, Android

As written in instructions, I recommend you to use https://chocolatey.org/ to install all the tools.

Create your React-Native App

$ react-native init IblisProject

It’s better for you to use a different name for your project as it will generate a Bunde ID (in App Store it must be unique). In the following, you just have to replace IblisProject with the name you choose.

Push your app to your remote Git repository

You can use only Github or BitBucket

$ cd IblisProject
$ git init
$ git add .
$ git commit -m "first commit"
$ git remote add origin https://xxx@bitbucket.org/xxx/xx.git
$ git push -u origin master

Register your Bundle ID on App Store

Go to https://developer.apple.com/account/ios/identifier/bundle

By default, the Bundle ID set up by React-Native is org.reactjs.native.example.iblisproject (you can change it if needed)

Create your App ID and Bundle ID

Create your AppStore Certificate

To create all the Keys you need to have OpenSSL installed. On Administrator Powershell launch :

$ choco install openssl.light

Create your RSA key

$ openssl genrsa -out iblis.key 2048

Create your Certificate Signing Request (CSR)

$ openssl req -new -key iblis.key -out iblis.certSigningRequest

Fill all pieces of information needed (Country, Company name, etc …)

Go to the Certificate in Apple Developer Portal https://developer.apple.com/account/ios/certificate/

Create an iOS Certificate
Upload the generated file iblis.certSigningRequest
Download the certificate file ios_distribution.cer

Create your AppStore Production Provisioning Profiles

Go to the Certificate in Apple Developer Portal https://developer.apple.com/account/ios/profile/production

Open the Distribution Provisioning Profile
Add a new Distribution Provisioning Profile and choose App Store
Select the App ID previously created
Select the Certificate created previously
Write your profile name Iblis Distribution
Download the file Iblis_Distribution.mobileprovision

Create the p12 Key

Generate the pem file

$ openssl x509 -in .\ios_distribution.cer -inform DER -out .\ios_distribution.pem -outform PEM

Generate the p12 and fill password when asked (remember it)

$ openssl pkcs12 -export -inkey .\iblis.key -in .\ios_distribution.pem -out .\ios_distribution.p12

Create your App in the App Store

Go to https://appstoreconnect.apple.com/

Go to my app and New App
Choose the Bundle ID Created

Open an account in Visual Studio App Center

Create your account here: https://appcenter.ms/create-account

After creating your account, choose to add a new app

Select iOS and React Native
Go to build and add your git repo (no need to install Add App Center’s SDK)
Click setting on your branch
Choose Automatically increment build number
Add the file Iblis_Distribution.mobileprovision and ios_distribution.p12 (use the password in p12)
Add yourself in the distribute builds, then Save & Build

Upload your release for the first time (if needed)

Setup your app Icon

Install generator-rn-toolbox

$ npm install -g yo generator-rn-toolbox

Install ImageMagick

$ choco install imagemagick.app

Download an icon template (can use this one if you don’t have one) https://facebook.github.io/react-native/img/showcase/adsmanager.png

Move the file icon.psd to the app folder and launch

$ yo rn-toolbox:assets --icon adsmanager.png --ios

Add export compliance keys

In ./ios/IblisProject/info.plist paste at the end before </dict></plist>

<key>ITSAppUsesNonExemptEncryption</key>  
<false/>

Then commit the created files and push to the remote.

If you have selected “Build this branch on every push” the app will be built automatically.

Build the branch on every push

If it’s the first time, you cannot use VS App Center to deploy to the store

Dowload the .ipa

Then you need a mac. But you don’t need to have XCode and compile the project. You can ask a friend :) to use Application Loader and upload the .ipa

Use Application Loader on a Mac to upload your .ipa

Deploy your App to App Store (if already be deployed once)

Go to Distribute Store and Connect to App Store
Assign the App we have created
Choose distribute to Store
You can send to TestFlight
Go to App Store Connect and add yourself as a tester
On your device, you can now see the App and test it

To Deploy to App Store you just have to choose the build and Submit for Review

Of course for development of real app, it’s hardly recommended to have a Mac and make local development with XCode. Anyway, you can still use this method for Continuous Deployment for your iOS App.

--

--

Vincent Delacourt

Interesting in start-up or project development in the latest technologies for web and mobile apps