How Do You Embed a Provisioning Profile in an iOS App

17,690

The file should be called embedded.mobileprovision

It should be placed inside the .ipa zip file, in the directory Payload/.app/

XCode's "Build and Archive" then "Share..." functionality automatically adds it (so you can use unzip on the .ipa generated by XCode's share feature to see where the files should go).

I'm unclear exactly which scenarios this is supported in, however it definitely works for adhoc builds when you're installing directly from the web onto the device (ie. using the method described here: http://developer.apple.com/iphone/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html )

Share:
17,690
DwarDoh
Author by

DwarDoh

Updated on June 03, 2022

Comments

  • DwarDoh
    DwarDoh almost 2 years

    I read in the iOS Enterprise Developer Program docs that a provisioning profile can be embedded with the application.

    I am wondering how this is done. Is it simply added to the Payload directory of an IPA, or included in the project directory?

    I also wonder whether this technique is generally available for all deployment modes/Programs, or is it just for Enterprise distribution deployments?

  • DwarDoh
    DwarDoh over 13 years
    Thanks Joseph, I really appreciate it!
  • DwarDoh
    DwarDoh over 13 years
    You are saying inside the Payload directory, then also inside the ipa, I assume you mean just in the payload directory. Can you confirm?
  • DwarDoh
    DwarDoh over 13 years
    Is appleembedded.mobileprovision the name of the provision file or a directory?
  • JosephH
    JosephH over 13 years
    I've tried to clarify my answer a bit. I mean in the Payload directory that is inside of the .ipa, and the file should be called embedded.mobileprovision. Perhaps you've not realised, but the .ipa file is just a zip file.
  • DwarDoh
    DwarDoh over 13 years
    I have done this now successfully. It's an added convenience in deployment. Even better is that I've discovered YOU DO NOT NEED TO RENAME the provisioning profile. ALSO, IT GOES DIRECTLY INTO the PAYLOAD directory, not .app.