Xcode 8 Automatic provisioning failed issue - ios

I am trying to test my app on a new device.
I am trying to automatically manage signing on Xcode and the Provisioning Profile is selected to "Automatic" in Build Settings.
However I am getting the following error:
Anyone know what I might be missing?
I have selected my personal team too, it is just not shown in the screen shot here(redacted)
UPDATE
Few things that might help:
I do not currently have a paid membership(it expired 2 weeks back).
Account settings are correctly configured in Preferences.
I am successfully able to run on another device which I have used in the past with my paid developer account.

If you do not have an active, paid, subscription to the Apple Developer program then you cannot add additional devices to your provisioning profiles.
Any devices that have been previously registered against your membership will continue to work until those provisioning profiles expire.

Related

developing in simulator but xcode ask for registered device

hi im new to programming
I want to build the app in Xcode as a free user and using simulator only but then got the error "failed to create a provisioning profile. there are no devices registered in your account on the developer website" in signing option.
I tried to register a device on https://developer.apple.com
but they say I need to enroll for developer program to do it, and it needs me to pay with money which I don't want to for this moment.
i've changed the generic device in drop down menu to many simulator but to no avail.
thank you for helping
You do not require provisioning profile to run application in simulator. And if you have apple account then you can test your application in device. Just add your account in account section in preferences. Xcode will automatically create provisioning certificate to run on you device. Device must have logged in with same apple account.
Select simulator instead of the generic device.
Please refer below screenshots.
Run+Build your project.
The way to run iOS applications without having a Provisioning Profile,
as of 07/23/2021 is to remove the Entitlements association, also set your Signing Identity to Automatic.

Provisioning profiles status invalid (managed by XCode)

Suddenly all my provisioning profiles are in status Invalid (managed by XCode). Why?
Also I remember in XCode 4 that you always had to create your provisioning profile. Now XCode autocreates your provisioning profile for development. Is this a new feature on XCode 6?
I had the same problem today.
In the Apple Developer website, all of my company's Provisioning Profiles were marked as "Invalid (managed in Xcode)". None were out of them were date, none were using iOS Certificates which had expired, and the website gave zero suggestion that anything was actually wrong.
The solution, ridiculously, was to delete my perfectly valid iOS Certificates, and recreate them.
We write in-house apps aswell as apps for the App Store, and Apple (quietly) refuses to let you have more than 2 of these at once. So I was unable to create a third iOS Certificate which would allow me to use the "In house and Ad-hoc" option, hence the need to delete an iOS Certificate first.
Once I had pointlessly recreated the "iOS Certificate", the Provisioning Profiles came to life.
Part 2 of this farce is to go into Xcode, and delete your Provision Profiles (XCode \ Preferences \ select your iOS Certificate \ View Details, then select all of your provisioning profiles, right click and select "Move to trash".
At this point, absolutely nothing will change, and you'll think you've done something wrong.
But then, if you then quit Xcode, and go back in, then you'll see the Provisioning Profiles will have disappeared.
Now you can re-download the Provisioning Profiles from the Apple Developers website, and redownload the latest versions.
Until Xcode 7.2 comes along, and breaks something else.
(Seriously, I spend more time fighting with Xcode bugs than writing code..)
Apple introduced Xcode Managed profiles in Xcode 5 as a way to try and make the provisioning process less cumbersome and get Developers sending code to their devices without having to go through the manual upload/setup/download/install/build process. In effect, Xcode was completely automating the entire provisioning process whenever there was a code sign error detected. For developers that had already wrestled with understanding Provisioning, this new behavior was frustrating as the processes those teams put in place were unintentionally being wrecked by Xcode's best attempts to be helpful. That said, it is better today but not as transparent as it should be when it comes to affecting your Certificates, Identities, and Profiles data. If you are't familiar with what all is included in a provisioning profile or signing identity, there's some related reading you might want to skim: What are code signing identities?
Suddenly all my provisioning profiles are in status Invalid (managed by XCode). Why?
The most common reason for a profile to move to the "Invalid" state is because at least one of the profile's registered test devices has been deactivated / removed from the developer's account. By doing so, all profiles that included that device UDID are marked as invalid and require regeneration. This can be accomplished in Xcode > Preferences > Accounts, clicking 'View Details' on your Apple ID account, and then clicking the refresh button in the lower right corner of that account details screen.
Also I remember in XCode 4 that you always had to create your provisioning profile. Now XCode autocreates your provisioning profile for development. Is this a new feature on XCode 6?
As stated in the start of this answer, no. Autogenerated provisioning profiles were introduced in Xcode 5 and the workflow has been refined several times since Xcode 5.0 and modern Xcode. If you allow Xcode to assist you with Code Signing error messages, its default position is to check the validity of your development or distribution certificate (depending on what kind of code sign operation you were trying to do), check the validity of the AppId and Provisioning Profile, and revoke then reissue whichever part of the signing identity is in error.
Really it messing up on me. it destroyed my 4 hours fighting with Xcode. At last created another new provisioning file with selecting appleID as iOS Wildcard App ID (xxx.*)

iOS 9 new feature Free Provisioning (Run your app on a device, just with your Apple ID, without Apple developer membership)

Would like to know about the new feature Free Provisioning introduced in iOS9 & Xcode 7.
How Apple is now achieving that, as before we knew our device ids were enrolled in the profiles and hence it was possible to deploy the app on devices.
Now only with Apple ID how the things in the background are achieved, also is there any restrictions on how many number of devices I can add my build with Free Provisioning.
Any help is greatly appreciated thanks...
1. How it works?
Apple Ref : How to use free provisioning
As stated in above link under Launch Your App on Devices Using Free Provisioning point 6. "Xcode creates a free provisioning profile for you"
Update: Above point 6 is removed from link, but there is no change in the way it works and steps in above link still work!
Profile created in this way is tied to your apple id, when you try to run app on new device that device's UDID gets added in this profile.
2. How to use free provisioning?
Requirements: Apple ID, XCode 7 or above
Steps:
Go to XCode Preference
Go to Accounts tab and hit plus "+" button on bottom left to add your Apple ID.
After successfully adding Apple ID click on view details on bottom right
Click the Create button next to "iOS Development"
Connect your device and select your device as build destination.
In target's general setting,
a. Set app identifier you want to give to your free profile
b. set team id as your apple id
c. If using XCode 7, hit Fix Issue button below provisioning profile warning.
If using XCode 8, there is no Fix Issue button XCode will automatically do this.
In both cases of XCode versions, Xcode will either create new profile if not found for your apple id or add new device to your existing profile.
Run the app, this will install app.
Click app icon to start app manually, you will get "Untrusted Developer" dialog. To trust your apple id, Go to iPhone setting > General > Device Management > Select your apple id and click trust.
After step 8 you can run and debug app using free provisioning.
3. What are the Limitations?
I tried to install app with free provisioning and could run/debug app. But there are few catches. Profile created by XCode is bit different than our usual developer profiles
From profile raw file
There is new key LocalProvision with value true
<key>LocalProvision</key>
<true/>
Many services like following are not available, See full list of services
Apple Pay, Game Center, iCloud, In-App Purchasing, Push Notifications, Wallet (Was Passbook)
Expires in 7 days (this was changed sometime in May, previously it was 90 days).
<key>TimeToLive</key>
<integer>7</integer>
Old: 90 days
New: 7 days
Under <key>ProvisionedDevices</key> there is list of devices on which I tried to install app, still unknown maximum number of devices possible, I tried to install on 3 devices which worked successfully.
This is not alternative to publishing app for free on app store, you still need to enroll to developer program to publish apps.
Testflight based internal / External testing is not possible.
Apple haven't disclosed the thing like, how they are managing on their developer portal. But I think they just removed the restriction of Paid Developer program & rest of the thing kept as it is.
For standard developer Program Apple support 100 device so I think same will apply here.
Refer this link for more info..
Copied from: https://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/free-provisioning/
Limitations
Apple has imposed a number of limitations on when and how you can use free provisioning to run your application on an iOS device, ensuring that you can only deploy to your device. These are listed in this section.
Access to iTunes Connect is also limited and therefore services such as publishing to the App Store and TestFlight are unavailable to developers provisioning their applications freely. An Apple Developer Account (Enterprise or Personal) is required to distribute via Ad Hoc and In-House means.
Provisioning Profiles created in this way will expire after three months, Signing Identities after one year. Furthermore, provisioning profiles will only be created with explicit App IDs and so you will need to follow the instructions above for every app that you wish to install.
Provisioning for most application services is also not possible with free provisioning. This includes:
Apple Pay
Game Center
iCloud
In-App Purchasing
Push Notifications
Wallet (Was Passbook)
Some more informations.
You can archive app with free provisioning profile. But You can't export ipa in "XCode 7"
But you can use XCode 5 or Command line "xcodebuild" to export ipa file.
I tried using OTA to install this ipa file. And it's work!
So... If there has a way to add UUID to your account without XCode (REST api calls). You can distribute your app to anyone you want.

iOS Distribution Provisioning Profile invalidates itself when new devices are added

I've got a Distribution Provisioning Profile I use for distributing my application to QA testers via AdHoc builds / HockeyApp. I'm also part of a team of other developers working on other apps, and they have their own QA teams.
Whenever someone else adds a device to the Apple Developer Member Center (previously the "Provisioning Portal") located at https://developer.apple.com/membercenter/index.action , the Distribution Provisioning Profile becomes Invalid.
To make the profile valid again, I must open up the profile and include all of the newly added devices in the profile, then re-download it.
This is all fine, but it seems unnecessary. My Distribution Provisioning Profile should only need the devices of my app's testers linked to it, not the devices others have added for their own testing purposes.
Does anyone have any information / links to documentation on why this happens (searches only seem to bring up the common issues with provisioning profiles in general that people always run into when starting out), and whether or not there is a way to get around it?
Thanks,
- Adam

"TestFlight Users In The Provisioning Profile" doesn't coincide with users in the AdHoc provisioning profile

I have created a totally new TestFlight account, when I add the build to the account I see 79 users under TestFlight Users In The Provisioning Profile. The problem is that I have built the application using an ADHoc provisioning profile that contains just 3 devices, so why I'm seeing the full list of devices that I've registered with the Apple Developer Portal and not just the device that are available in the Provisioning profile (as stated by the sentence TestFlight Users In The Provisioning Profile) ?
I occasionally run into this problem and get it working again after trying a few things.
Restart Xcode. (It's amazing how often that solves the problem.)
Make sure that you are bundling the correct provisioning profile with the app when archiving and exporting. If you're using Xcode 6, the process has been changed a bit and you might be including the wrong profile. (Look in your Build Settings and then also look at the details on each screen as you are exporting the archive.)
Try re-generating your provisioning profile.
Make sure you have refreshed your account in Xcode so that it has the latest provisioning profile.
If those don't work, try creating a new signing certificate and generating your profile with that.
Then refresh your account in Xcode again.
If that's still not working, try removing your account from Xcode completely, restarting Xcode, and adding your account again.
Those are some of the tricks I use to get things working again. Maybe there is a more definitive answer out there.
I have also face the same problem.
This is because the provisioning profile you create from apple developer account.
Have that 79 devices register with that apple developer account.
Please check that account once.

Resources