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:

luke2012

Well-Known Member
Licensed User
Longtime User
I'm new to iOS development.

1) Dev & Test
If I understood well, a developer certificate and provisioning file is always mandatory to compile a iOS app and install it on a device.

2) Publish an app to App Store for a customer
Which is the best solution in this case ?
Create a new developer account (App Store) and assign it to the customer (name, email, etc) or publish his app on my development (personal) account ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You should have started a new thread for this question.

1. Note that you can use a production certificate (ad hoc). It has advantages over the development certificate.

2. Creating a new account will cost the client $99 per year. On the other hand if you upload it with your account then the client will not be able to switch to a different developer in the future. It is up to the client to decide.
 

luke2012

Well-Known Member
Licensed User
Longtime User
Within the step "Creating a new key" (video) I have the attached b4i error: "Mac verify error: invalid password?"
 

Attachments

  • passerr.PNG
    passerr.PNG
    10.1 KB · Views: 694

luke2012

Well-Known Member
Licensed User
Longtime User
Are you using the hosted builder or a local Mac?

Local iMac (MacOS Sierra) with Java 8.
See the build server output (attached file).
See also test url.

Note that the Mac is set with a static ip (mac en0 192.168.0.x). The windows machine is running within a Parallels VM.

Test URL: http://192.168.0.<mac static ip>:51041/test ---> OK (see output)

So the mac machine and the windows machine (Parallels WM) is both on the 192.168 network but the build server (running on Mac machine) starts on:
https://10.37.x.x:51042
http://10.37.x.x:51041

Mac machine network interfaces:

en0 ---> 192.168.x.x
vnic1 ---> 10.37.x.x

It seem that the build server bind his network on the vnic1 network and not on en0 network (mac machine).
This thing could raise this error ? If the answer is "yes" I think that the solution is to let the build server bind his network on the en0 (mac) network. Right ?

P.S.
First try the procedure raised an error "sending error" because the port I set was the http default port and not the https default port.
After I set the https default port (to solve the problem) the procedure raised the "Mac verify error: invalid password?".
 

Attachments

  • build_server.txt
    5.9 KB · Views: 743
  • test_url.PNG
    test_url.PNG
    3.8 KB · Views: 668
  • server_settings.PNG
    server_settings.PNG
    12.5 KB · Views: 673
Last edited:

luke2012

Well-Known Member
Licensed User
Longtime User
I've sent you an id for the hosted builder. Once you get it working with the hosted builder you can switch to the local builder.

Thanks @Erel!
I appreciated your help (also because today is Monday) :)

I'm trying to follow your instructions.
 
Last edited:

luke2012

Well-Known Member
Licensed User
Longtime User
I configured the the IDE using your instruction (user id and Hosted builder flag) but the same error has been raised.
When the "Create New" procedure start it ask the question: "Existing keys in this folder will be deleted. Do you want to continue?"...

What I'm missing?
 

rbirago

Active Member
Licensed User
Longtime User
I'm trying to start developing in B4I, so I've purchased B4I, registered to Apple Developer Program and now I'm trying to configure B4I.
I've configured paths and now I'm trying to set sign Key. Following any kind of suggestions at the "create new" always it waits some seconds and then it answer me with "connect failure" (see attached png). I have no active firewall on my Win 10 pc.
 

Attachments

  • ConnectFailure.png
    ConnectFailure.png
    10.2 KB · Views: 729

rbirago

Active Member
Licensed User
Longtime User
Really I've not yet configured Build Server Settings, because the hints in the forum don't mention these params as initial steps. Anyway I will use Hosted Builder (I' don't use a local Mac). So, which params have I to set at this point?
 

rbirago

Active Member
Licensed User
Longtime User
thank you, now the step is got. I think it should be better to highlight these initial steps of B4I setup, because they are not so obvious (at least to me).
 

fbritop

Active Member
Licensed User
Longtime User
Erel,
What means after I compile: "Application compiled with non-store provision profile."

It does not download a ZIP archive but only an IPA which I cannot upload to the itunes store. The only ZIP is the tmp.zip which is invalid

Thanks
FBP
 

tufanv

Expert
Licensed User
Longtime User
Erel,
What means after I compile: "Application compiled with non-store provision profile."

It does not download a ZIP archive but only an IPA which I cannot upload to the itunes store. The only ZIP is the tmp.zip which is invalid

Thanks
FBP

It means that you used a development provision profile, you need to use a production provision profile (app store) in order to upload to itunes store.
 

fbritop

Active Member
Licensed User
Longtime User
But im using the one from production, as you can see.

b4x.jpg

B4X:
        #CertificateFile: ios_distribution.cer
        #ProvisionFile: llaveMovilFireBase.mobileprovision
 

tufanv

Expert
Licensed User
Longtime User
But im using the one from production, as you can see.

b4x.jpg

B4X:
        #CertificateFile: ios_distribution.cer
        #ProvisionFile: llaveMovilFireBase.mobileprovision

is it a store provision profile or other ? ( like adhoc etc.. ) BTW if you are using it for firebase i think you must not use wildcard but the actual app id.
 

fbritop

Active Member
Licensed User
Longtime User
It is an AdHoc prov file. It uses a non wildcard app Id (it just change it with my mouse while I was trying a screen capture, but it has always been with XXXXXXXXX.com.llavemovil.iphone.

Do I need a device connected through the bridge in order to compile?. I'm doing a minor modification to the App while on my holidays, and I'm not carring my Dev iPhone with me, Just trying to get the release and upload it to iTunes Connect.
 
Status
Not open for further replies.
Top