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)
Registering your Devices
– You can only install on devices that are registered
– Go to https://developer.apple.com/account/resources/devices/list
– Add you UDID there, you can get UDID from https://showmyudid.com/
– Info: https://www.igeeksblog.com/how-to-find-iphone-udid-number/
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!
– 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.cnf)
– Enter following command> openssl genrsa -out mykey.key 2048
– 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
– Create App ID (make it wildcard, so you can use it for many apps) https://developer.apple.com/account/resources/identifiers/list
– WARNING: Bundle ID is CASE-SENSITIVE!
– Go to “Certificates, Identifiers & Profiles” https://developer.apple.com/account/resources/certificates/list
– Create Distribution certificate (“iOS Distribution (App Store and Ad Hoc)”, cloud build says so)
– *If you have too many added (cannot add new), need to revoke some old cert first
– Upload signing certificate (its the file you created in earlier steps here)
– Download it (ios_distribution.cer)
Creating .p12 file in Windows
– Download your “ios_distribution.cer” from previous step (and copy it into your openssl folder)
– Open command prompt (NOTE run as administrator)
– Enter following command> openssl x509 -in ios_distribution.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) *Note: if you paste the password in from notepad, it might not work(?)
Creating .mobileProvision file
– Register a New Provisioning Profile at https://developer.apple.com/account/resources/profiles/list
– Select Adhoc, continue
– Select AppID (select your wildcard id from there), continue
– Select certificate from list (should be todays date), continue
– Select devices (all, you need to have them added first in devices place), continue
– Set “Provisioning Profile Name”
– Click Generate
– Click Download “yourfile.mobileprovision”
Building .ipa with Unity cloud build
– Go to unity cloud build: https://cloud.unity.com/home > Dev Ops > Configurations > Edit your config, add new credentials
– Create new IOS Project (just follow the instructions on the site, its quite simple)
– And when it asks for the Mobile Prov File and .p12 files, you now have them!
– If you want to Update your signing cert inside cloud build, do these steps:
– Go to dev ops, Build automation, Settings, Credentials /
– Edit existing configuration (… update credentials)
– Select your mobileprovision file
– Select your .12 file
– Enter password
– Then hit Build and download your .ipa file
Copying .ipa to iOS Device
– Note this is not tested on 2022.. since there is no itunes access to pad anymore either? (but you can use those generated cert files in Unity Cloud build)
– 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
—
ALTERNATIVE WAY TO BUILD ON WINDOWS PC
– Can use IOS Builder plugin from asset store (its bit complicated to setup, but it does work!) https://assetstore.unity.com/packages/tools/utilities/ios-project-builder-for-windows-15522?aid=1101lGti
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
Errors:
“Failed to update credentials! The provisioning profile and .p12 file are not compatible (certificates did not match)!”
Generate your keys again, probably used wrong file or wrong password in some step..
Related Posts
21 Comments + Add Comment
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
well this plugin looks even better: “iOS Project Builder for Windows”
https://www.assetstore.unity3d.com/en/#!/content/15522?aid=1101lGti
upload to itunes connect without mac,
https://forum.unity3d.com/threads/application-loader-windows-tool.469008/
unity tutorial for making simple ios build from scratch (on mac)
https://unity3d.com/learn/tutorials/topics/mobile-touch/building-your-unity-game-ios-device-testing
Does this method still work?
yeah should work (havent tested with 2018 and latest itunes though)
“Cloud Build requires a Unity Teams Advanced subscription” is displayed when you access Cloud Build in developer.cloud.unity3d.com
yeah, seems like they removed the free tier some time ago : /
*oh wait, there is still some small free tier, maybe that works.
Is it still working today ?
When I try to build with unity cloud build I receive this error :
“exportArchive: No signing certificate “iOS Development” found”
havent tested since that time, ive read other people having similar error messages in forums.. not sure if there was any solution.
unity apple app store instructions
https://unsh.github.io/Unity-Apple-Distribution-Workflow/
when I went to the site to get the config file there was no download link
if its this link, https://docs.oracle.com/cd/E19509-01/820-3503/ggeyz/index.html can copy paste the config into text file
when I enter the commands from the steps for setting openssl I get the error that it cannot open the config file and it is unable to load config info
and these are done?
– .. same folder with openssl (with filename openssl.cfg)
– Enter following command> set OPENSSL_CONF…
I did what you said where I had to copy and paste the config into a text file then when I entered the command it was unable to load or open it.
Does this method still work?
not tested since that time.. asset store has those few pc to ios build plugins, which might be better solution (but might need mac at some steps)
Tested it recently, still works.
Just tested this with cloud build (2021), updated few steps, still works on PC (no mac required)
Generating iOS P12 / certs without Mac OSX Keychain (on linux, windows, etc)
https://gist.github.com/jcward/d08b33fc3e6c5f90c18437956e5ccc35
Jenkins Pipeline for Unity iOS
https://cemayan.medium.com/jenkins-pipeline-for-unity-ios-7cf66b3608f