None of the valid provisioning profiles include the devices? - ios

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.

Related

Xcode and Distribution .ipa application provisioning profiles

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.

Xcode 6 - Can't pick signing certificate/provisioning profile for Ad-Hoc distribution. Always taken default

To distribute the app we are using Xcode 6.0.1, where we encountered some issues by using the following process:
Added App-Id and distribution provision profile under developer program.
Chose provision profile under build settings and Archive application.
Chose Export option to do Ad-HocDistribute.
But with Xcode 6.0.1, this workflow was changed a bit. I couls still select the Ad-Hoc distribution option, but I cannot select the provisioning profile which I have created under developer program against my App-ID. There were no listing of provisional profile as we use to do in Xcode 5 version.
The Xcode 6.0.1 has tried to match the provisional profile from the dev-program and it returns message as no matching certificate and it automatically created identity as XC Ad Hoc * profile. Once I chose the Export option the XC Ad Hoc* profile has been created automatically under the distribution provision profile option in dev-program.
Under the provision profile all devices has been selected which I have added and listing total devices under my testflight application. Please assist me how to choose my provision profile which I have already created specifically for my application. Its really consume my whole day.
Xcode wanted to automatically sign with the default "XC com.*" wildcard provisioning profile instead of the explicit profile that already had.
To fix this, I just re-generated the profile on the Apple Developer Portal:
1) Go to developer.apple.com and find the distribution provisioning profile you want to use.
2) Select it, click "Edit", re-name the profile, and click "Generate".
3) Download the provisioning profile to the Desktop and drag it onto the Xcode 6 icon.
4) Re-start Xcode 6.
5) Open the organizer window and click "Submit" on the archive you built. Xcode will automatically pick your explicit profile instead of the generic one.
In Xcode 7 try to select "Use local signing assets" when selecting team. In my case it automatically selected custom Ad-Hoc profile, instead of XC Ad-Hoc*
It's quite tricky but in your app build settings, you don't have the good provisioning and/or the good code signing identity for the archive mode (RELEASE) and maybe be the bad team too. You have to re set all this things and re archive. You know it's good when Xcode show the good certificate.
Hope you will export your application.
Organizer -> Export worked for me as Organizer -> Upload to App Store and Validate were picking Xcode generated provisioning every-time.
Similar topic discussed here.

Xcode 6 - How to pick signing certificate/provisioning profile for Ad-Hoc distribution?

To distribute the app to our testers we use Xcode, which we do using the following process:
Archive application
Distribute for Ad-Hoc
Choose provisioning profile
Save the .ipa to a folder
But with Xcode 6, this workflow was changed a bit. I can still select the Ad-Hoc distribution option, but I cannot select the provisioning profile I want. This gives us no control over which signing certificate is used and the provisioning profile configuration (we use push notifications).
By default iPhone distribution signing identity is used and some kind of XC Ad Hoc provisioning profile is generated, which can be seen on image below:
If you click the arrow near provisioning profile, it opens the folder with provisioning profiles.
So my question is:
Is there any way in Xcode 6 to select the provisioning profile used with Ad Hoc distribution?
Thanks!
I was facing same issue, resolved using command line "xcodebuild" tool script, which is preinstalled with Xcode 6 (didn't need to re-install Xcode 5).
http://www.thecave.com/2014/09/16/using-xcodebuild-to-export-a-ipa-from-an-archive/
Script in terminal:
xcodebuild -exportArchive -archivePath $projectname.xcarchive -exportPath $projectname -exportFormat ipa -exportProvisioningProfile 'Provisioning Profile Name'
I had a similar issue when submitting to The App Store. I created an archive, then clicked "submit" and Xcode wanted to automatically sign with the default "XC com.*" wildcard provisioning profile instead of the explicit profile that already had.
To fix this, I just re-generated the profile on the Apple Developer Portal:
1) Go to developer.apple.com and find the distribution provisioning profile you want to use.
2) Select it, click "Edit", re-name the profile, and click "Generate".
3) Download the provisioning profile to the Desktop and drag it onto the Xcode 6 icon.
4) Re-start Xcode 6.
5) Open the organizer window and click "Submit" on the archive you built. Xcode will automatically pick your explicit profile instead of the generic one.
Once you are in Organizer
Select the ad-hoc build and click "Export...."
Select "Save for Ad Hoc Deployment" -> Next
Instead of selecting an organisation from the drop down select "Use local signing asset" -> Choose
Export and save .ipa as before.
Of course you need to have generated, downloaded and installed the ad-hoc provisioning profile.
It seems the last generated provisioning profile wins right now. So you can just re-generate the profile you want and download it and Xcode will use it.
A slightly better approach: set the desired prov profile in your target and use the command line to build your ipa, that works, too.
Here is the script, I'm using:
#!/bin/sh
# Current as working as of 2014/09/22
# Xcode 6
OUTPUTDIR="$HOME/build"
APPNAME="your-app"
SCHEME="your-app"
APP_WORKSPACE="$HOME/Path/To/your-app.xcworkspace"
rm "$OUTPUTDIR/$APPNAME.ipa" #deletes previous ipa
xcodebuild -workspace "$APP_WORKSPACE" -scheme "$SCHEME" archive -archivePath "$OUTPUTDIR/$APPNAME.xcarchive"
xcodebuild -exportArchive -exportFormat ipa -archivePath "$OUTPUTDIR/$APPNAME.xcarchive" -exportPath "$OUTPUTDIR/$APPNAME.ipa"
and my settings:
I couldn't figure this out either - got bit by it when submitting to the AppStore, where it defaulted to a wildcard profile.
I ended up building in Xcode 6, then going back to Xcode 5's Organizer window for the submission. That way it'll prompt you to pick a profile to sign with.
In Xcode 6 (at least 6.1 I am using now)when you are doing the export for ad hoc, xcode 6 will automatically scan if there is any provisioning profile contains all devices registered in the developer account and at the same time match the bundle ID. If no, it will use XC provision profile. Therefore, if you want to use your own profile, for example, for the purpose of push notification, you will need to select all devices in your profile on apple developer portal. I guess that's the reason why some people recreate profile would work and some wouldn't.
btw,use script can export and upload to testflight, but device just can't download it. probably somewhere I got wrong. if anyone knows why it is, pls let me know. tks
This worked for me:
click "View Accounts.." within the "..select a Development Team.."
dialog.
click "View Details.." and find the XC Ad Hoc provisioning profile.
right click on that profile and chose "Show in Finder".
delete the selected profile.
go back to the dialog in step 1.
click "Chose".
click the arrow near provisioning profile to open the provisioning
profiles directory.
delete again the generic profile like in step 4.
click "Previous" button from the "Send [application name] to Apple:" dialog.
select again "Save for Ad Hoc Deployment"
click again the "choose" button.
now you should see the right provisioning profile name.
I have a workaround for this that works for me.
I have both Xcode 6 and Xcode 5.1.1 installed, Xcode 6 is in Applications and Xcode 5.1.1 is in another directory. When I want to do a build I use Xcode 6 to create the Archive. But you can also see the created Archive in Xcode 5.1.1 so I use Xcode 5.1.1 to distribute the Ad Hoc .ipa using the provisioning profile that I want to use. So build using Xcode 6 but distribute using Xcode 5.1.1.
Using local signing assets while exporting solved the issue for me:
The answer from #MrPatol did not work for me.
My working scenario for Xcode 6.3.2
In Member Centre -> iOS Provisioning Profiles
Delete provisioning profile which was set by default when you were trying to build the app (e.g. "XC..."). Create an ad-hoc provisioning profile (not production) with a short name.
In iPhone Configuration Utility -> Provisioning Profiles
Delete the same provisioning profile (e.g. "XC...")
In Xcode -> Organizer
Select the ad-hoc build and click "Export...."
Select "Save for Ad Hoc Deployment" -> Next
Select an organisation from the drop down
Check that your new ad-hoc provisioning profile is selected automatically
Export and save .ipa as before.
Here are the two key points that solved the problem for me.
When you generate the provisioning profile, it needs to be linked to an Explicit App ID that uses the same bundle identifier as your app. A wildcard App ID will not work.
When you export the app for ad-hoc deployment, select Use local signing asset in the dropdown and click Choose.
Xcode will then find the correct provisioning profile by matching up the App ID with the bundle identifier of the app.
In fact, you need to create a new Distribution profile, specific for Ad Hoc Deployment. This can be found in the classic member center, but it is a new type of certificate.
You can then select which devices can be used to test the app as ou would do with a developer profile.
And the newly created certificate will be available when you export your package from the Organizer the usual way.
Alternatively you can use the TestFlight solution provided by Apple with iOS 8 to enable your user to have access to prerelease.
I had the same problem, finally I solved it regenerating the profile that I wanted to use in Xcode 6 including all the devices that I have registered on my iOS Dev account, doing it that way, when selecting export it shows the correct profile and I can do the Ad Hoc export with Xcode 6 without using a script. Hope it helps.
I've been stuck for a while with this ,, but using Crashlytics solved it , build distributed using the selected profile in the build settings of your Xcode project .
hope it helps somebody .
Almost the same problem. After creating an archive for distribution (Product > Archive) you export the archive (click Export...) and choose "Save for Enterprise Deployment"; then "Next". You then select the "Development Team" default (e.g. organisation name) and click "Choose". Finally you will be presented with a summary view that also lists the provisioning profile that Xcode automatically has found (maybe created on-the-fly) for you. This MIGHT be the wrong provisioning profile (typically a wildcard provisioning profile, like "XC: *") and MIGHT be happening because there already is a wildcard provisioning profile on the developer portal. The wildcard provisioning profile MIGHT be used by other older project and maybe it is not wise to just remove the wildcard provisioning profile from the developer portal.
I used a support ticket for this and only got this link back https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringPushNotifications/ConfiguringPushNotifications.html#//apple_ref/doc/uid/TP40012582-CH32-SW1. Not really a big help.
I have found that MrPatol's solution also works for Enterprise Deployment as well and solves the problem for us. I first logged into the developer portal and manually create a provisioning profile that suited my app. Then downloaded and installed the new manually created provisioning profile.
In xcode 7, I couldn't be able to pick adhoc provisioning via
Organizer -> Upload to App Store & Organizer -> Validate
But I could choose via Organizer -> Export
Edited:
Uploading the app after exporting for adhoc to app store for testFlight caused another issue discussed here. So, solution to both these problem is one. Create AppStore provisioning to be able to pick it via organizer and utilize testFlight by uploading to appstore.
I think it's a right way to specify a -exportOptionsPlist option after Xcode 7. It will choose the right provision files like in the GUI export no matter what you specify in project setting.
xcodebuild -exportArchive -archivePath $Archive_Path -exportPath
$LOCAL_PACKAGE_DIR -exportOptionsPlist $Export_Plist_Path
optionPlist file is like this,
<dict>
<key>teamID</key>
<string>MYTEAMID123</string>
<key> teamID </key>
<string>app-store</string>
<key>uploadSymbols</key>
<true/>
</dict>
<plist>
app-store, enterprise, ad-hoc, development are alternative
But you may meet another error after above.
Error Domain=IDEDistributionErrorDomain Code=14 "No applicable
devices found." UserInfo={NSLocalizedDescription=No applicable devices
found.}
It's a ruby problem. Try this shell script, xcbuild-safe.sh
xcbuild-safe.sh xxxxNormalOptionsInXcodebuild bla...
Wait for a moment, another strange error comes.
xcbuild-safe.sh: line 62: shell_session_update: command not found
What's the hell shell_session_update ? Let us work around it. Just define a function before the real xcodebuild cmd, namely at the line 60 or 61.
function shell_session_update() { :; }
In answer to your specific question, no there is no way to select the provisioning profile to be used. What are you attempting to do? (i.e. what does the profile that you want to select allow that the automatically generated one doesn't?)

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

Resources