Why this happens
When Xcode manages code signing automatically, it contacts Apple’s developer servers to register your App ID, fetch your development certificates, and generate a provisioning profile tied to your target devices. If any link in that chain fails, Xcode throws Failed to create provisioning profile.
The most common trigger is attempting to build against an abstract run destination such as Any iOS Device (or Generic iOS Device in earlier versions). Apple’s provisioning server cannot issue a development profile without knowing the exact hardware identifiers (UDIDs) of your testing devices. Simulators do not require provisioning profiles at all, whereas physical hardware requires registered UDIDs.
A second frequent cause is a conflicting or non-unique Bundle Identifier. If your bundle identifier matches an existing App ID registered by another team, or if you are using a free Apple Developer account and attempt to use reserved naming conventions or capabilities (such as Push Notifications or iCloud), Xcode cannot create the profile.
How to fix it
1. Change the active run destination
If you simply want to test your code and do not have a physical device plugged in, switch away from a generic device target:
- Look at the scheme selector at the top toolbar in Xcode (next to the Play and Stop buttons).
- Click the destination menu on the right side of the scheme selector.
- If it says Any iOS Device (arm64) or Generic Device, change it to any local iOS Simulator (e.g., iPhone 16).
- Press
Cmd + Bto build. Simulators do not require Apple provisioning profiles, so the error immediately clears.
If you intend to run on actual hardware:
1. Connect your physical iPhone or iPad to your Mac via USB or establish a trusted Wi-Fi pairing.
2. Select that specific, named device from the destination menu.
3. Xcode will now register the device’s UDID with your account and generate a valid profile.
2. Make the Bundle Identifier unique
When using automatic signing—especially on free Personal Team accounts—Xcode cannot generate a profile if another developer has already claimed the Bundle ID worldwide:
- Select your project in the Project Navigator (
Cmd + 1). - Select your application target under Targets.
- Click the Signing & Capabilities tab.
- Locate the Bundle Identifier field.
- Append a unique suffix or your own domain name (for example, change
com.example.myapptocom.yourname.myapp123). - Press Return. Xcode will immediately query the developer portal and generate a new profile for the unique ID.
3. Verify Team selection and Apple ID session
If your session token with Apple’s Developer Portal has expired or you have not assigned a team, Xcode will fail during profile generation:
- Open Xcode settings (
Cmd + ,) and navigate to the Accounts tab. - Check your Apple ID listed on the left. If it displays an alert icon or requests you to sign in again, re-enter your credentials.
- Return to your project target’s Signing & Capabilities tab.
- Under Signing, ensure Automatically manage signing is checked.
- Open the Team dropdown and explicitly select your account (either your paid Developer Program team or
Your Name (Personal Team)).
Signing
[x] Automatically manage signing
Team: John Appleseed (Personal Team)
Bundle Identifier: com.jappleseed.sampleapp
Provisioning Profile: Xcode Managed Profile
Signing Certificate: Apple Development: ...
4. Remove unsupported capabilities on free accounts
Free Apple IDs (Personal Teams) support basic deployment on personal devices, but they do not support advanced entitlements such as Push Notifications, Apple Pay, or Associated Domains:
- Go to your target’s Signing & Capabilities tab.
- Inspect the list of capabilities below the Signing section.
- If you see entitlements that require a paid membership (indicated by red error warnings), click the small x in the top-right corner of that capability box to remove it.
- Let Xcode refresh the profile automatically.
How to prevent it
- Default to a Simulator target during initial development: Only switch to hardware destinations when you have your test device connected and unlocked.
- Use reverse-DNS naming with personal domains: Avoid default prefixes like
com.exampleor generic app names that easily collide with existing App IDs. - Keep your Apple ID authenticated: Check Xcode’s Accounts preferences periodically to ensure developer session tokens have not lapsed.
- Avoid manual profile overrides: Keep Automatically manage signing enabled unless your CI/CD pipeline specifically requires explicit provisioning profiles.
FAQ
Can I run apps on a physical iPhone using a free Apple ID?
Yes. A free Apple Developer account allows you to install apps on your personal devices using a Personal Team provisioning profile. These profiles expire after 7 days, after which you must rebuild and reinstall through Xcode.
Why does Xcode throw this error when ‘Any iOS Device’ is selected?
‘Any iOS Device’ is a generic compilation target used for creating universal archives. It does not map to a physical UDID, so Xcode’s automatic development signing cannot generate a device-specific provisioning profile for it.
Will resetting my Mac’s local provisioning profiles fix this error?
If Xcode has cached corrupted metadata, removing cached profiles at ~/Library/MobileDevice/Provisioning Profiles/ can help. However, this specific error is usually caused by an unresolved Bundle ID conflict or an unselected hardware target rather than corrupt local caches.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.
