📜 ⬆️ ⬇️

Publishing HTML5 applications in the AppStore without Mac

Many developers of hybrid mobile applications face the challenge of signing and publishing iOS applications without using a Mac.

With Android, everything is more or less simple: we install the SDK (under Windows, Mac or Linux), build the application, and publish apk to Google play via the web interface. With Apple, this number does not work: you need a Mac to generate the key, sign the application and publish the ipa in the AppStore. How to solve this problem in Windows?

Openssl


You need to download and install OpenSSL under Win. At the installation stage, choose to copy the DLL files to the / bin folder , instead of the system directory.


')
The rest of this manual assumes that you have downloaded " Win32 OpenSSL v1.0.2e " and installed it in the C: \ OpenSSL folder.

Key generation


1. Next you need to generate a private key. Go to the command line and go to the directory in which you plan to store the created files. Then enter the following command to generate the key:

C:\OpenSSL\bin\openssl genrsa -out mykey.key 2048 

2. Enter the following command to create a certificate request (CSR):

 C:\OpenSSL\bin\openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj "/emailAddress=you@mail.ru, CN=Your Name, C=RU" 

Do not forget to specify your email address and name, and in the field C = change the code of your country, if necessary.

3. Go to the developer account on the Apple website , in the "Certificates, Identifiers & Profiles" section. Click the button to add a certificate:



4. Choose what type of certificate you need ( App Store and Ad Hoc is suitable for publishing on the AppStore).
5. The site will display information about the Certificate Signing Request (CSR), feel free to click "Continue".

6. Download the certificate request file (.certSigningRequest) and click “Generate”.



7. Certificate ios_distribution.cer is ready. Download it to the folder you created earlier.

8. At the command prompt, enter the command to convert .cer to .pem:

 C:\OpenSSL\bin\openssl x509 -in ios_distribution.cer -inform DER -out ios_distribution.pem -outform PEM 

9. After that, enter the P12-key generation command:

 C:\OpenSSL\bin\openssl pkcs12 -export -inkey mykey.key -in ios_distribution.pem -out iphone_dist.p12 

You will be prompted to enter a password and confirm it.

Profile Generation


1. Return to the Apple Developer account in the section Identifiers> App IDs and create the application ID.
2. After that, initialize the application profile in the section “Provisioning Profiles> Distribution”. You need to select the App ID and the certificate to be included in the profile. Click “Generate” and download the .mobileprovision file:



Download in AppStore


Using a provision-file and a P12-key you will be able to collect an ipa-file in the cloud PhoneGap Build or Intel XDK .

It remains to upload your ipa-file in the AppStore. Unfortunately, this can be done only through Xcode or Application Loader , which work only on Mac. To solve this problem, someone buys a Mac mini (as the most budget of the Mac line), someone uses special services .

Personally, I rent a remote Mac over the Internet (about $ 1 per hour):
macincloud.com
virtualmacosx.com
macminivault.com

Source: https://habr.com/ru/post/272785/


All Articles