Software Archive
Read-only legacy content
17060 Discussions

Creating P12 Files On Windows

Tester_D_
Beginner
3,156 Views

Hello everyone!

I'm trying to create a .p12 file so I can debug on an iPad but I'm encountering some problems.

I found a tutorial teaching how to create the .p12 along with a .mobileprovision on a Windows maching using OpenSSL, but I had no luck actually inspecting the app with the files generated from this process, always getting the error on the image I attached to the post.

Is there an effective way to generate those files on Windows not using the process showed on the tutorial I mentioned before?

 

Erik

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
3,156 Views

Do you have an Apple Developer account? You'll need that, otherwise you won't be able to generate the necessary credentials.
 

0 Kudos
Tester_D_
Beginner
3,156 Views

Hello Paul,

Yes I do. I followed precisely the instructions I found on the tutorial I mentioned before, and this included an upload to my Apple Developer account of the .csr file I generated with OpenSSL and also the making of a .mobileprovision file associated with the UDID of the iPad I intent to debug. From what I've seen generating those files is way easier on a Mac, which I don't have access currently.

I'm guessing my problem comes from the fact that I used a tutorial for Phonegap and maybe there is some incompatibility of this process with XDK, am I correct?

Thanks for the reply!

0 Kudos
PaulF_IntelCorp
Employee
3,156 Views

I'm no expert on that process, it is a very confusing process, but that process looks to me like it should generate what you need to create your debuggable App Preview. In essence, you need to get a "development" certificate that matches your account sent to the build system so it can resign App Preview for installation on your test device. It is important that you create a development certificate and that the provisioning file be a simple wildcard for the App ID (*), otherwise it won't work.

There are also instructions available on our site, here:

There is a two step process that you have to go through, presented in the XDK, to get this done. If you created the P12 manually, you would supply that in the first step, then supply the provisioning file in the second step. This is the screen I am referring to:

Screen Shot 2015-09-25 at 11.34.46 AM.png

If you can see this message, it means your device is not being seen over the USB connection...

Screen Shot 2015-09-25 at 11.29.49 AM.png

Assuming you want to have the XDK help you with this process, here's how:

  • Get to the first screen above, where the XDK can see your device over USB, if it cannot see your device over USB, see the second screen (above) for some hints on how to get there.
     
  • Once the XDK can see your device, you should be able to get to the first screen above. Assuming that is where you are, select the "Help Me Make This File" button answer "No" to the question in this dialog:
    Screen Shot 2015-09-25 at 11.43.26 AM.png
     
  • At the next dialog, "Download" the CSR and save it on your system (something like "my-ios.csr"):
    Screen Shot 2015-09-25 at 11.45.37 AM.png
     
  • After you have downloaded the CSR file you should get a dialog that points you to instructions to use the Apple Dev Center to use your CSR to get a CER file (from Apple). Those instructions are here: http://www.html5dev-software.intel.com/amdocs/lib/Intel_Walkthrough_ObtainAppleDevCert.pdf
     
  • Follow the instructions in the link above; I just confirmed that they are correct and accurate. If you followed them you should have downloaded to your development system a CER file from Apple that is probably named something like "ios_development.cer" -- you need that file for the next step. So now you can select "Next" from the dialog that got you the instructions for the above:
    Screen Shot 2015-09-25 at 1.09.04 PM.png
     
  • Now answer "Yes" to the next dialog, requesting that the Intel XDK create your P12 file:
    Screen Shot 2015-09-25 at 1.10.53 PM.png
     
  • You will immediately be asked to upload a file. You need to upload the CER file you previously downloaded from your Apple Developer Account (not the CSR file that you downloaded from the Intel XDK). You will also be asked to provide a password for the P12 file that the Intel XDK is going to create from the CER file that you are uploading.
    Screen Shot 2015-09-25 at 1.14.25 PM.png
     
  • After providing a password for the P12 file you will immediately be asked to download that P12 file. After downloading the P12 file you should see a dialog like the following. Notice that the Intel XDK automatically pointed to the P12 file that you just downloaded, you simply need to enter the password you just provided in the previous step, because the Intel XDK did not save that password. The Intel XDK used the password to create a P12 file, gave you the P12 file it created, and then threw away the password, for security purposes (so that if someone hacked into your account on our system they would not find the password to your Apple certs).
    Screen Shot 2015-09-25 at 1.17.29 PM.png
     
  • Now you need to provide a mobile provisioning file, which you must get from your Apple Developer Account. The instructions for that can be found here: http://www.html5dev-software.intel.com/amdocs/lib/Intel_Walkthrough_CreateDevProvProfile.pdf
     
  • VERY IMPORTANT! Be sure to set the App ID in the mobile provisioning file you create to '*' so that it will work with any App ID and make sure you created a Development certificate. Because the App ID inside of App Preview does not match any of the App IDs that you may be using for your applications, you must use a wildcard. In other words, the mobile provisioning file you create for this purpose needs to work with App Preview, so setting it to a single wildcard value of '*' (without the quotes) accomplishes that.
     
  • Download the mobile provisioning file you created by following the instructions in the link above and answer "Yes" to the dialog that is asking if you have your mobile provisioning file (after you've downloaded that file from your Apple Dev Account):
    Screen Shot 2015-09-25 at 1.29.45 PM.png
     
  • After you have provided both files to the Intel XDK you should see something like the following. Notice the two green dots on the icons for the P12 and the Provisioning Files. These green dots indicate that this step is complete.
    Screen Shot 2015-09-25 at 1.33.36 PM.png
     
  • Push the "Configure" button and the Intel XDK will upload the two files you provided and use them to "re-sign" a copy of App Preview for iOS. When it completes this process it will download and attempt to install this newly re-signed copy of App Preview onto your attached iOS device.
    Screen Shot 2015-09-25 at 1.36.00 PM.png
     
  • You will be prompted to save a file, with no hints as to what that file is (actually, there were hints, in the previous screen, shown above). What it is asking you to save is the signed copy of App Preview. Save it as something like "re-signed-app-preview.ipa" on your system, so you can manually install this IPA onto your device if the Intel XDK fails or you want to install it on another device to avoid going through the entire process again. NOTE: make sure there are no other copies of App Preview stored in the directory where you are prompted to save your re-signed copy of App Preview, there have been instances where the wrong copy of App Preview was pushed to the device.
0 Kudos
Reply