iOS Tutorial Creating a certificate and provisioning profile

Status
Not open for further replies.
Don't panic!
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.


Steps required:

IDE
  • Tools - Configure Paths
  • Tools - Build Server - Server Settings
  • Tools - Private Sign Key - fill password and click on Create New Key
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
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

Administrator
Staff member
Licensed 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
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: 391

luke2012

Well-Known Member
Licensed 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: 383
  • test_url.PNG
    test_url.PNG
    3.8 KB · Views: 373
  • server_settings.PNG
    server_settings.PNG
    12.5 KB · Views: 389
Last edited:

luke2012

Well-Known Member
Licensed 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
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
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: 442

rbirago

Active Member
Licensed 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
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
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
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
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
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
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