Xcode and Distribution .ipa application provisioning profiles - ios

I lost few days trying to figure this out. I created new provisioning profile on my dev account for Ad Hoc distribution, I added required certificates. I did set everything to this profile in General tab and Build settings for both project and target, I'm not using Automatic signing. When I archive project I'm using diawi app to install .ipa file on my iPhone but I keep getting error that provisioning profile inside this app doesn't seem to contain your device's UDID.

your provisioning profile must contain your device's UDID.

Related

None of the valid provisioning profiles include the devices?

We have a company account .
We have created the developer and distribution provisioning files, and drag them into Xcode.
When we try to code sign for distribution, we choose the release to be :
iPhone distribution:companyName
We always get this error when trying to put the app on real iPhone ( this iPhone is registered in the dev center and included in the dev provisioning file! ):
None of the valid provisioning profiles include the devices:myDevice
But they Are include this device.
You can use a provisioning profile created for Ad Hoc Deployment to solve this issue:
Create an Archive: Xcode->Product->Archive
After the Archive is created: Export (pane on the right) -> Save for Ad Hoc Deployment -> Follow through the process; whether you save the .ipa file in the end is irrelevant
Go back to "Build Settings" and set "Code Signing Identity" for Release to "iOS Distribution", build and run! Xcode will automatically pick the ad hoc provisioning profile created (named "XC Ad Hoc: xxx") which includes all your devices. You can check it at the Member Center at developer.apple.com as well.
I had the exact same problem and the above worked. Xcode version 6.4.

Error Code-90161 Invalid provisioning profile

ERROR ITMS-90161:"Invalid Provisioning Profile
I have created IPA using Xamarin IOS in ad-hoc mode and selected a adhoc provisioning profile. but while uploading, following error annoying me :(
when I uploaded using application loader:
ERROR ITMS-90161:"Invalid Provisioning Profile.The provisioning profile included in the bundle x.x.x.x[Payload/x.x.x.app] is invalid.[Missing code-signing certificate.] For more information,visit the iOS developer Portal."
If you get this error, you probably don't have the correct type of Provisioning Profile. There's a few types of Provisioning Profiles, most notably are the "Development" and "Distribution" profiles. I suggest looking at your provisioning profiles, and if necessary recreate them.
To elaborate: You have 1 Certificate (created via Xcode Certificate Generating). With this Certificate, you can create an "App Identifier", and Provisioning Profiles. You can use the same Certificate for both a Developer Provisioning Profile and a Distribution Provisioning Profile. They don't work with one another, meaning a Developer Provisioning Profile won't work for a release build, and a Distribution Provisioning Profile won't work for a debugg build.
Try this, and see if that helps. Be sure to haul the new profiles in Xcode (or any other method you'd use) and edit your project's settings.
Good luck!
Love and regards,
Björn
My issue was related to having Xcode Automatically manage signing. What finally fixed the issue for me was going into the developer portal, selecting Certificates, and revoking the Distribution Managed certificate. I then rebuilt my project in Xcode, keeping the checkmark enabled to Automatically manage signing, and a new Distribution Managed certificate was automatically created in the developer portal under certificates. Distributing the archive to the App Store no longer produced any errors.
This issue also came up in other projects where I manually manage the Provisioning Profile. What worked for me was doing the following on the developer.apple.com portal:
Revoke the existing Distribution Certificate linked to the app's provisioning profile.
Issue a new Apple Distribution Certificate.
Link the new certificate to the app's provisioning profile.
Make sure to select the correct provisioning profile for your app's target in Xcode.
While de3z1e's solution seems to work for most people, it did not work for me. What did work was creating an Apple Distribution cert when using XCode settings. While Xcode is open,
Go to preferences (Command + ,) -> Accounts -> Choose your team -> Manage certificates -> + (bottom left) -> Apple Distribution -> Re-archive + upload
I am not sure why the other solution did not work for me, but this did. I also have Xcode manual signing on and left it on.
For Distribution:
If you upload to Test Flight you need an Apple Store provisioning Profile.
If you are distributing to specific devices, you need Ad hoc provisioning profile.
You assign it in visual studio through Manual Provisioning, choosing an Apple Distribution Identity, and choosing your provisioning profile manualy - nothing in automatic.
If you like me could not find your newly created provisioning profile to appear in visual studio, make sure the bundile indetifier in info.plist is the same as used in the provisioning profile.
If you are white-labeling as per xam-girls blog, other copies of info.plist is not looked at by visual studio iOS Bundle Signing
I faced same problem. I edited profiles, it works.
Click edit button all provisioning profiles and save it. Download and use edited profiles. App will upload to store.

Issue with signing app with wildcard profile

I developed an iPad application to a client. My client has Apple Enterprise license. But they dont allow me to sign the app with their certificate. They just ask me to provide .xarchive file so that they can sign the app and create the ipa file.
This is how I have done that
1. Create a appid with com.mycompany.myapp.abc
2. Create a adhoc profile using above appid with my developer portal
3. set the bundle ID of my app com.mycompany.myapp.abc
4. Set the code signing identity to above profile in my app's target
5. archive the file using xcode 4.6.1
6. export the xarchive file and send to the client
7. Ask client to create a inhouse Dis profile with com.mycompany.myapp.* appid
8. Ask client to open the xarchive file using xcode and sign the app with inhouse profile and create the ipa file
They have followed above instructions in 7,8 and have created the ipa file. But when we try to install the ipa file using xcode to a device it gives following error.
Does above procedure has any problem. Can some one explain the issue.
EDIT:
for testing purpose I created adhoc profile with com.mycompany.* and created an ipa file by signing above xarchive file, it gives the same error message. But If I sign the xarchive file with profile crated with com.mycompany.myapp.abc bundle id works fine.
TL;DR:
Find out what the client's (provisioning profile's) entitlements are and make sure you match them.
The error is trying to say that the entitlements in your provisioning profile and their provisioning profiles differ. The difference could be a keychain group, push notification environment or something else.
The reason why Xcode asks you to choose a provisioning profile twice (once when archiving, once when distributing) is that all the provisioning profile entitlements are picked up in archive stage and mostly ignored in the distribution stage.
This makes it all too easy to distribute with the wrong entitlements, especially if your archive stage accidentally picked up a wildcard profile. Not your case, but that's why you should burn wildcard profiles with fire.
There are clever re-signing scripts (a.k.a. "Distribute..." button replacements) that will try to make the entitlements right by mashing what they find in the end user provisioning profile into your binary but I think the best solution is to make sure your provisioning profile's entitlements and any extra entitlements you add to your app matches their provisioning profile's.
I find Xcode's provisioning profile/entitlement system to be error prone. On hand you have entitlements that are basically part of your app's identity and may as well be set in stone (TODO: make your CI server check them). And on the other hand you have Xcode's build phase gleefully changing your app's entitlements based on its automatic/random provisioning profile selection. Silly.
You should follow the below step to make adhoc distribution .ipa for client
set bundle identifier in target info.plist
select the ad hoc distribution profile in target as well as in project
select iOS device then product-> archieve
organizer will pop up then select the archive and select "distribute" -> Adhoc Enterprise distribution
select the correct ad hoc distribution profile then save this .ipa file.
then send it to the client and let him know that before archiving or building the app we need correct adhoc provisioning profile . so there is no need to repeat the process at your end to set the provisioning or other stuff just distribute it .
How to distribute your iOS app over the air:
Just need to place the .ipa file and plist on a server and set the path in the above link example.

Cannot add distribution provisioning profile to Xcode 5

I'm trying to distribute my Phonegap app on the iTunes. I have done this before successfully before but I have since changed to a new Mac. I'm using Xcode 5.0.2.
I have created development and distribution certificates. I then created an App ID, entering the Bundle ID under "Explicit App ID".
I then created a development provisioning profile for the app, choosing the correct App I.D., the iOS Development certificate, my device, giving the profile a name and clicking "generate". I download it and double click to add to xcode. The xcode organiser opens and I see it added under my device provisioning profiles. I can then successfully run the app on my physical device.
Now I want to distribute it. I created a new provisioning profle, selecting "App Store" under Distribution, selecting the correct App I.D., the iOS Distribution certificate, and clicking "generate". When I double click the downloaded file, the organiser in xcode opens, but the distribution provisioning profile doesn't under the device provisioning profiles. When I click the + button to add the profile, I cannot select the Distribution provisioning profile, but I can select the Development provisioning profile:
I have no idea why this is. I tried closing down and opening xcode, to no avail. I tried waiting a few hours. Again, it didnt work.
I then try to distribute my app by creating an archive. First I go to build settings > code signing and choose iPhone Distribution:
I then select my physical device and choose Product > Archive. I get the error:
No matching provisioning profiles found
None of the valid provisioning profiles include the device Belgian Iphone (identifier: xxxxxxxxxxxxxxxxxxxxxxx).
Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.
I click "Fix Issue" and end up with the error:
There was an error generating the team provisioning profile for AppID 'FT49U8Q9JE'.
The AppID given here is different to the prefix in App ID's in the developer portal. I don't know if it should be the same. Any suggestion? I have spent 3 days on this problem and as stated above, I had no issues on my previous mac (which I no longer have)!
Something that got me recently was having to actually set the provisioning profile in the build settings

Ad hoc distribution: failed to install app

I'm developing an ios app (only for iphone) and trying to have other people test it. I have no problem installing the app on my own device through Ad hoc distribution. When I tried installing on another person's device, it always failed with the message "xxxxx could not be installed at this time". I'm using xcode 5.
Here are the steps that I followed:
Add the device's UDID to the existing Ad hoc provisioning profile in the developer portal
Download that provisioning profile and drag that to the xcode organizer
Under code signing->provisioning profile->release, choose the Ad hoc provisioning profile. Under code signing identity->release, choose the distribution certificate from the Ad hoc profile. I set the provisioning profile (debug) to none and set the code signing identity(debug) to 'don't code sign'.
Build the app and create an archive.
Click the Distribute button in Organizer. Choose "Save for Enterprise or Ad Hoc deployment" and then select the Ad hoc provisioning profile.
Click export and check "save for enterprise distribution". Fill in the application url and title.
Upload the ipa and plist file to a server. Create an index page which contains a link to the plist file. The link looks like this:
Install Application
Send the url of the index page to the tester.
Did I miss anything? I tried deleting all the provisioning profiles on my phone and then had no problem installing the app by clicking the "Install Application" link. One weird thing that I noticed was that the status of the ad hoc provisioning profile installed on the other person's iphone was "Valid signing identity not found", as well as the team shown as "unknown". I saw somebody mentioned "Code signing entitlements". Does that matter if I leave that empty?
Couple of things to try out:
Check that the UDID you added to the portal is ticked for use under the AdHoc provision. When adding a new UDID it's possible to forget to manually update the provision profile with the new UDID.
Don't create the link yourself and don't use a plist. Just drag the ipa you created to a site like http://www.diawi.com/ and share that link with your tester.
Good Luck
You might want to check that the app bundle identifier in Xcode project is identical to that on Apple Developer portal. App bundle ids are case-sensitive.
Here's a question and more answers about a similar installation issue.

Resources