Nov
22
2016

Publish .ipa file from Windows PC to iOS without Mac

With Unity Cloud Build service, you can create iOS apps, without ever needing Macintosh+XCode!

First steps

– Register as an Apple Developer : https://developer.apple.com/programs/enroll/
– Join Unity Cloud Build (if you haven’t already) : https://unity3d.com/services/cloud-build
– Follow cloud build instructions there, its quite simple to setup iOS project
(but you’ll need to have the project at source control somewhere, for example github.com, bitbucket.com)

Creating .CSR file in Windows (Certificate Signing Request)

– Download openssl binary : https://indy.fulgan.com/SSL/ (i used this version )
– Unzip it
– Open Command Prompt on that folder  *Note: Must run command prompt as an Administrator!
– Enter following command> openssl genrsa -out mykey.key 2048
– Download missing openssl.cfg file from this page https://docs.oracle.com/cd/E19509-01/820-3503/ggeyz/index.html and place it to the same folder with openssl (with filename openssl.cfg)
– Enter following command> set OPENSSL_CONF=c:\YourOpensslFolder\openssl.cnf
– Enter following command> openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest  -subj “/emailAddress=yourAddress@example.com, CN=YourName, C=US”
– Now you can upload the generated “CertificateSigningRequest.certSigningRequest” file into Apple Developer site (when creating the Production Certificate in next step)

Setting Up Apple Developer Licenses

– Login into Apple Developer Account
– Go to “Certificates, Identifiers & Profiles”
– Create Production certificate (for App Store and Ad Hoc)
– Upload your .csr file that you generated in previous step
– Create App ID (make it wildcard, so you can use it for many apps)
– Create Provision Profile for Distribution

Creating .p12 file in Windows

– Download your “ios_development.cer” from Production Certificates list (and copy it into your openssl folder)
– Enter following command> openssl x509 -in ios_development.cer -inform DER -out developer_identity.pem -outform PEM
– Uses the mykey.key we created in CRS creation
– Enter following command> openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12
– enter password (write it down, as you will need it later)

Building .ipa with Unity cloud build

– Go to unity cloud build: https://unity3d.com/services/cloud-build
– Create new IOS Project (just follow the instructions on the site, its quite simple)
– And when it asks for the Provisioning Profile and .p12 files, you now have them!
– Then hit Build and download your .ipa file

Copying .ipa to iOS Device

– Install iTunes
– Connect ios device to your pc
– Click […] and select Apps (shows all available apps on this machine, not from the ipad)
– Remove your old app from the list (if its there), right click, delete
– Then drag and drop the cloud build .ipa file here (cannot drag and drop it directly to the ipad)
– Then click [] Ipad icon to view your ipad
– Click Apps (in left panel)
– Scroll down to see your .ipa app listed there
– Click Install (or Update) button *it changes to Will Install or Will Update
– Click Apply button at the bottom
– Done! You can now run the app on ipad
*Note: First you need to authorize and sync the ipad to this machine

References:
https://unity3d.com/learn/tutorials/topics/cloud-build/your-first-cloud-build-project
http://help.adobe.com/en_US/as3/iphone/WS144092a96ffef7cc-371badff126abc17b1f-7fff.html
http://help.adobe.com/en_US/as3/iphone/WS144092a96ffef7cc-371badff126abc17b1f-8000.html
https://www.tbs-certificates.co.uk/FAQ/en/openssl-windows.html
http://docs.telerik.com/platform/appbuilder/cordova/code-signing-your-app/configuring-code-signing-for-ios-apps/create-distribution-certificate


1 Comment + Add Comment

Leave a comment

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.