iOS Tutorial Creating a certificate and provisioning profile

Status
Not open for further replies.
Don't panic!

Edit: The IDE must be configured with javac from OpenJDK 14: https://www.b4x.com/b4j/files/java/jdk-14.0.1.zip
Otherwise the key created will be invalid and you will later encounter this error: MAC verification failed during PKCS12 import (wrong password?)

While this process can be a bit annoying it is not too complicated and you can always delete the keys and start from scratch (which is not always the case in Android).

Note that you must first register with Apple as an iOS developer (costs $99 per year).
The whole process is done on a Windows computer.

In order to install an app on an iOS device you need to create a certificate and a provisioning profile.

The certificate is used to sign the application. The provisioning profile, which is tied to a specific certificate, includes a list of devices that this app can be installed on.
Edit: pay attention to the certificate and provision profile options selection in the following screenshots (the options in the video are a bit different):

1642693415951.png

1642693576135.png




Steps required:

IDE
UDID
Apple developer account - developer.apple.com
  • Devices - Add device
  • App Id - Create wildcard app id
  • Certificate - Create distribution certificate (ad hoc + store)
  • Provision Profile - Create distribution profile (ad hoc)

Next tutorial: https://www.b4x.com/android/forum/threads/installing-b4i-bridge-and-debugging-first-app.45871/
 
Last edited:

Greg Shannon

Member
Licensed User
Longtime User
That fixed it, I had several version of javac.exe on my computer, I didn't have it set to the correct one. Thanks.
 

Levisvv

Member
Licensed User
Longtime User
When I try to create a key, using 123456 I get an error back stating MAC Builder: Invalid Password
 

OliverA

Expert
Licensed User
Longtime User
I had the same problem initially with setting up the private key as did posts #45 and #52/53. It looks like the procedure is as follows (for first time setup of private key):

Tools -> Private Sign Key:

1) You can leave "First and last name:", "Organization:", and "Country (two letters):" at their default value.
2) Set the password to the password you want to use.
3) Click on "Create New" button.
4) Receive error message (as shown in the posts mentioned) and close the message out (do not close out "Sign Key" form!).
Note: Two files will have been created in the keys folder (set up under Tools->Configure Paths), but the csr file is missing.
5) Click on the "Set Password" button.
6) The "Sign Key" entry form will disappear.
7) Go to Tools->Private Sign Key
Note: You should now see the password that you used in step#2 (with the other fields set to Unknown).
8) Optional: Fill out all non-password fields (please note restrictions on characters used in those fields, see keystore file problem)
9) Click "Create New" (Note that you'll get a message about deleting any existing keys, which is fine in this case).
10) Presto!!!!

Summary: When setting up a Private Key for the first time, generate the key with your password and let it fail. Set the password. Re-enter private key generation dialog and fill (if wanted) out the information and generate the key.
 

OliverA

Expert
Licensed User
Longtime User
Forgot to mention: I'm using B4i version 2.51, JDK 1.8u92, Windows 10 Pro (10.0.10586) logged in as a "normal" user, and B4i Beginner's Guide v 2015.08.24 (and getting stuck on Section 1.3.2 step#2, the creation of the private sign key).
 

Peter Yeung

Member
Licensed User
Longtime User
I had the same problem initially with setting up the private key as did posts #45 and #52/53. It looks like the procedure is as follows (for first time setup of private key):

Tools -> Private Sign Key:

1) You can leave "First and last name:", "Organization:", and "Country (two letters):" at their default value.
2) Set the password to the password you want to use.
3) Click on "Create New" button.
4) Receive error message (as shown in the posts mentioned) and close the message out (do not close out "Sign Key" form!).
Note: Two files will have been created in the keys folder (set up under Tools->Configure Paths), but the csr file is missing.
5) Click on the "Set Password" button.
6) The "Sign Key" entry form will disappear.
7) Go to Tools->Private Sign Key
Note: You should now see the password that you used in step#2 (with the other fields set to Unknown).
8) Optional: Fill out all non-password fields (please note restrictions on characters used in those fields, see keystore file problem)
9) Click "Create New" (Note that you'll get a message about deleting any existing keys, which is fine in this case).
10) Presto!!!!

Summary: When setting up a Private Key for the first time, generate the key with your password and let it fail. Set the password. Re-enter private key generation dialog and fill (if wanted) out the information and generate the key.

It works for me like a charm. Many thanks!
 

clx

Member
Licensed User
Longtime User
Nevermind, figured it out. Thanks anyways!
 
Last edited:

Ugo Giovanni

New Member
Licensed User
Good morning Erel.
I 'the first time I write on this forum but having just purchased B4I and HOST MAC Builder I doubt, I compile an app as a test and try it on my iphone arose before it is final?

As far as I see ID serves apple, provisioning and certificate from the same apple, but if I want to develop an app on my own and give it to some customers, what sense does it pay € 99 annually for an application we use only three people?

There is a system where you can develop, test and just without necessarily having to pay to be a developer? Then if it works as it should work, then step to the distribution phase of apple store.
Very complex proceedings and can not install the B4i-bridge.

I look forward to your info, the forum is everything but a specific solution I have not found.
I'm sorry for my English rather translated ..


Mistakes:
B4i version: 2.51
Parsing code. (0.00s)
Compiling code. (0.03s)
Compiling code layouts. (0.01s)
Compiling code debugger engine. (0.58s)
Building Xcode project (0.07s)
Sending data to remote compiler. error
mobileprovision file not found.
 

Ugo Giovanni

New Member
Licensed User

Ugo Giovanni

New Member
Licensed User
[Quote = "Erel, posta: 440.318, membro: 1"] Non sono sicuro di aver capito. Stai ancora aspettando per Apple di elaborare il pagamento? Si può prendere uno o due giorni. [/ Quote]
sì ....
im non consente ancora una volta.
 

Joerg Rothballer

Member
Licensed User
Longtime User
Hi Erel,
no Problem to get an Apple-Developer status. Also no Problem to create an new Certificate
After this I create by Identifiers an AppID
Problem now If I would like to get an Provisioning Profile I allways have to register an device by UDID.
I don´t have an IOS-Device. I would use Hosted Builder. This i have activated in Tools - Build Server - Server Setings
During Creating Provisioning Profiles i MUST Register an Device but I dont have an UDID?
What ist my Error ?
Thanks Joerg
 

Joerg Rothballer

Member
Licensed User
Longtime User
Hi Erel,
my understanding was that if I would like to use the "hosted builder" I don´t need my own IOS-Device.
So I MUST have ANY (tablet od iphone) IOS-Product. Is this right?
... and the idea of the hosted builder is that is not neccessary to install XCode?
So I think I have to get my first ios-Device :-(
 
Status
Not open for further replies.
Top