When building, archiving, or running an iOS app in Xcode, you may encounter an error such as:
Code signing is required for product type 'Application' in SDK 'iOS'
This error means that the target requires code signing, but Xcode cannot determine or access a valid signing configuration.
Common causes include a missing development team, disabled automatic signing, a missing signing certificate, an unavailable provisioning profile, incorrect Build Settings, or missing signing assets in a command-line or CI build environment.
Start by checking Signing & Capabilities. If that does not resolve the issue, inspect the effective build settings, certificates, private keys, provisioning profiles, and Debug versus Release configuration.
- What does “Code signing is required” mean?
- Common causes
- 1. No development team is selected
- 2. Automatically manage signing is disabled
- 3. No signing certificate is available
- 4. The certificate has no matching private key
- 5. No provisioning profile matches the target
- 6. The Bundle Identifier is incorrect
- 7. CODE_SIGN_STYLE is set to Manual
- 8. CODE_SIGNING_ALLOWED has been changed
- 9. CODE_SIGN_IDENTITY contains an obsolete value
- 10. Command-line or CI builds have no signing assets
- 11. An extension target is not configured
- 12. Debug and Release use different signing settings
- Typical situations where the error occurs
- What to check first
- Solution 1: Select a development team
- Solution 2: Enable Automatically manage signing
- Solution 3: Add your Apple Account to Xcode
- Solution 4: Check available signing identities
- Solution 5: Verify the certificate and private key
- Solution 6: Verify the provisioning profile
- Solution 7: Verify the Bundle Identifier
- Solution 8: Check CODE_SIGN_STYLE
- Solution 9: Check CODE_SIGNING_ALLOWED
- Solution 10: Check CODE_SIGN_IDENTITY
- Solution 11: Inspect all effective signing settings
- Solution 12: Check .xcconfig overrides
- Solution 13: Compare Debug and Release
- Solution 14: Check extension signing
- Solution 15: Remove outdated provisioning profiles
- Solution 16: Clean the build environment
- If the error occurs with xcodebuild
- If you only need an iOS Simulator build
- If the error occurs in CI
- If you cloned the project from GitHub
- If you moved to a new Mac
- If Archive fails but Debug works
- What you should not do
- Fast troubleshooting checklist
- Summary
What does “Code signing is required” mean?
Apps built for physical iOS devices must be code signed before they can be installed and run.
Code signing typically depends on:
- Development Team
- Signing Certificate
- Provisioning Profile
- Bundle Identifier
- Entitlements
- Code Signing Style
If Xcode cannot resolve these requirements, the build process cannot complete the signing stage.
Code signing is required for product type 'Application' in SDK 'iOS'
Common causes
1. No development team is selected
If Team is set to None in Signing & Capabilities, Xcode does not know which Apple Developer team should sign the target.
2. Automatically manage signing is disabled
With manual signing, you must provide compatible certificates and provisioning profiles yourself.
Missing or incompatible manual-signing values can trigger this error.
3. No signing certificate is available
The Mac may not have a usable Apple Development or distribution certificate.
4. The certificate has no matching private key
A certificate without its private key cannot be used for code signing.
This often occurs when only a .cer certificate file was copied from another Mac.
5. No provisioning profile matches the target
Manual signing requires a profile that matches the current Bundle Identifier, team, certificate, and other requirements.
6. The Bundle Identifier is incorrect
The target’s PRODUCT_BUNDLE_IDENTIFIER may not match the App ID and provisioning profile used for signing.
7. CODE_SIGN_STYLE is set to Manual
Older projects or projects copied from another environment may unexpectedly retain manual-signing settings.
8. CODE_SIGNING_ALLOWED has been changed
A build configuration or .xcconfig file may override CODE_SIGNING_ALLOWED in a way that conflicts with the build target.
9. CODE_SIGN_IDENTITY contains an obsolete value
Older projects may contain hard-coded signing identities such as:
iPhone Developer
Modern Xcode projects are generally easier to manage through Signing & Capabilities instead of hard-coding old identity names.
10. Command-line or CI builds have no signing assets
A project may build successfully in the Xcode GUI but fail with xcodebuild or in CI because certificates, private keys, profiles, or team settings are missing.
11. An extension target is not configured
The main app can be correctly signed while a Widget, Share Extension, or Notification Service Extension still has no valid signing configuration.
12. Debug and Release use different signing settings
If device debugging works but Archive fails, Release may use a different code-signing configuration.
Typical situations where the error occurs
- Running a new Xcode project on a physical device
- Cloning a project from GitHub
- Moving the project to another Mac
- Reinstalling Xcode
- Using Xcode without adding an Apple Account
- Switching from automatic to manual signing
- Replacing a signing certificate
- Removing provisioning profiles
- Adding a Widget or other extension
- Building with xcodebuild
- Building in GitHub Actions, Jenkins, or another CI system
- When Debug works but Archive fails
What to check first
1. Check Signing & Capabilities
Open:
Project → TARGETS → Your App → Signing & Capabilities
Verify:
- Team
- Bundle Identifier
- Automatically manage signing
- Signing Certificate
- Provisioning Profile
2. Check code-signing Build Settings
Review:
CODE_SIGN_STYLE CODE_SIGN_IDENTITY DEVELOPMENT_TEAM CODE_SIGNING_ALLOWED PROVISIONING_PROFILE PROVISIONING_PROFILE_SPECIFIER PRODUCT_BUNDLE_IDENTIFIER
Solution 1: Select a development team
If no Team is selected:
- Select the target.
- Open Signing & Capabilities.
- Check the Team field.
- Select the appropriate Apple Developer team.
- Build again.
Tip: If your Apple Account belongs to multiple teams, select the team that owns the relevant App ID and signing resources.
Solution 2: Enable Automatically manage signing
If manual signing is not required, automatic signing is usually the easiest configuration.
- Select the target.
- Open Signing & Capabilities.
- Enable Automatically manage signing.
- Select the correct Team.
- Build again.
Xcode can then manage the provisioning profile and related signing settings.
Solution 3: Add your Apple Account to Xcode
If your Team does not appear, open:
Xcode → Settings → Accounts
Add the Apple Account associated with your developer team, then return to Signing & Capabilities.
Solution 4: Check available signing identities
Use Terminal to list usable code-signing identities:
security find-identity -v -p codesigning
A working configuration may look like:
1) ABCDEF1234567890 "Apple Development: Developer Name (ABCDE12345)" 1 valid identities found
If you see:
0 valid identities found
the Mac has no usable signing identity. Create a development certificate in Xcode or correctly install the certificate and its private key.
Solution 5: Verify the certificate and private key
Open Keychain Access and expand the Apple Development certificate.
A private key should appear underneath it.
Important: If no private key appears under the certificate, the certificate cannot sign code on that Mac.
If you need to reuse the same identity on another Mac, export both the certificate and private key as a password-protected .p12 file.
Certificate + Private Key ↓ Export as .p12 ↓ Import on another Mac
Solution 6: Verify the provisioning profile
If you use manual signing, confirm that the provisioning profile:
- Uses the correct App ID
- Belongs to the correct development team
- Contains the current signing certificate
- Includes the test device when required
- Has not expired
Decode a profile with:
security cms -D -i MyProfile.mobileprovision > profile.plist plutil -p profile.plist
Solution 7: Verify the Bundle Identifier
Check the target’s Bundle Identifier:
com.example.myapp
To inspect the effective value:
xcodebuild -showBuildSettings | grep PRODUCT_BUNDLE_IDENTIFIER
Example:
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp
Make sure it matches the App ID and provisioning profile used for signing.
Solution 8: Check CODE_SIGN_STYLE
Inspect the effective setting:
xcodebuild -showBuildSettings | grep CODE_SIGN_STYLE
For automatic signing, you should normally see:
CODE_SIGN_STYLE = Automatic
If the project unexpectedly uses Manual signing, correct the configuration in Signing & Capabilities.
Solution 9: Check CODE_SIGNING_ALLOWED
Inspect the value with:
xcodebuild -showBuildSettings | grep CODE_SIGNING_ALLOWED
A normal device-build configuration may show:
CODE_SIGNING_ALLOWED = YES
Warning: Do not set CODE_SIGNING_ALLOWED=NO merely to hide this error for a physical-device application build. That avoids signing rather than fixing the signing configuration.
Solution 10: Check CODE_SIGN_IDENTITY
Inspect the effective value:
xcodebuild -showBuildSettings | grep CODE_SIGN_IDENTITY
Older projects may still contain obsolete hard-coded values such as:
iPhone Developer
If you use automatic signing, avoid unnecessary hard-coded signing identities.
Solution 11: Inspect all effective signing settings
You can quickly inspect the most important values with:
xcodebuild -showBuildSettings | grep -E "CODE_SIGN|DEVELOPMENT_TEAM|PROVISIONING_PROFILE|PRODUCT_BUNDLE_IDENTIFIER"
Review:
- CODE_SIGN_STYLE
- CODE_SIGN_IDENTITY
- CODE_SIGNING_ALLOWED
- DEVELOPMENT_TEAM
- PROVISIONING_PROFILE
- PROVISIONING_PROFILE_SPECIFIER
- PRODUCT_BUNDLE_IDENTIFIER
Solution 12: Check .xcconfig overrides
An .xcconfig file may override signing settings.
DEVELOPMENT_TEAM = ABCDE12345 CODE_SIGN_STYLE = Automatic PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp
If the Xcode UI looks correct but the build uses different values, inspect all configuration files.
Solution 13: Compare Debug and Release
If device debugging works but Archive fails, compare the configurations.
xcodebuild -showBuildSettings -configuration Debug | grep -E "CODE_SIGN|DEVELOPMENT_TEAM|PROVISIONING"
xcodebuild -showBuildSettings -configuration Release | grep -E "CODE_SIGN|DEVELOPMENT_TEAM|PROVISIONING"
Release may still use manual signing, an obsolete profile, or another development team.
Solution 14: Check extension signing
Review all relevant targets, including:
- Widget Extension
- Share Extension
- Notification Service Extension
- Watch app
- App Clip
Each target has its own Signing & Capabilities configuration.
Solution 15: Remove outdated provisioning profiles
Cached profiles are commonly stored under:
~/Library/MobileDevice/Provisioning Profiles/
List them with:
ls ~/Library/MobileDevice/Provisioning\ Profiles/
Back up important profiles, remove obsolete ones, and let automatic signing obtain an appropriate profile again.
Solution 16: Clean the build environment
After fixing the signing settings, use:
Product → Clean Build Folder
If needed:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Important: Removing DerivedData does not repair missing certificates or provisioning profiles. Use it only after correcting the actual signing configuration.
If the error occurs with xcodebuild
If the Xcode GUI builds successfully but the command line fails, you can explicitly provide the development team in some workflows:
xcodebuild \ -project MyApp.xcodeproj \ -scheme MyApp \ -configuration Debug \ DEVELOPMENT_TEAM=ABCDE12345 \ build
This does not replace a missing certificate or provisioning profile. Those signing assets must still be available.
If you only need an iOS Simulator build
Simulator builds do not use the same physical-device code-signing requirements.
For example:
xcodebuild \ -scheme MyApp \ -sdk iphonesimulator \ -destination 'platform=iOS Simulator,name=iPhone 16' \ build
Note: A successful Simulator build does not prove that the physical-device signing configuration is correct.
If the error occurs in CI
CI environments such as GitHub Actions, Jenkins, and Bitrise do not automatically have access to signing identities from your local Mac.
Check the CI keychain:
security find-identity -v -p codesigning
Then inspect the build settings:
xcodebuild -showBuildSettings \ -scheme MyApp \ -configuration Release \ | grep -E "CODE_SIGN|DEVELOPMENT_TEAM|PROVISIONING_PROFILE|PRODUCT_BUNDLE_IDENTIFIER"
A typical CI signing setup may require:
- Signing certificate
- Private key
- Provisioning profile
- Development team
- Bundle Identifier
Store .p12 and provisioning-profile data securely as CI secrets rather than committing them to source control.
If you cloned the project from GitHub
Try this sequence:
- Change the Bundle Identifier to one you control.
- Select your development team.
- Enable Automatically manage signing.
- Check signing for every extension.
- Connect your device and build again.
The original author’s signing configuration generally cannot be used by your Apple Developer team.
If you moved to a new Mac
Copying an Xcode project does not transfer the private keys stored in the old Mac’s keychain.
Check the new Mac with:
security find-identity -v -p codesigning
If you see 0 valid identities found, create a new development certificate or securely transfer the original certificate and private key.
If Archive fails but Debug works
Archive typically uses the Release configuration.
Check:
- CODE_SIGN_STYLE
- DEVELOPMENT_TEAM
- CODE_SIGN_IDENTITY
- PROVISIONING_PROFILE_SPECIFIER
A project can therefore debug successfully while still failing during distribution signing.
What you should not do
Do not permanently set CODE_SIGNING_ALLOWED=NO for a physical-device application simply to hide the signing error.
Also avoid revoking certificates unnecessarily or changing the Bundle Identifier of an existing distributed app without understanding the consequences.
Fast troubleshooting checklist
- Check the Team in Signing & Capabilities.
- Enable automatic signing when appropriate.
- Verify your Apple Account in Xcode.
- Run security find-identity.
- Check that the certificate has its private key.
- Verify the Bundle Identifier.
- Verify the provisioning profile.
- Check CODE_SIGN_STYLE.
- Check CODE_SIGNING_ALLOWED.
- Compare Debug and Release.
- Check extension signing.
- Clean the build folder after fixing the settings.
Summary
The Xcode error “Code signing is required for product type ‘Application’ in SDK ‘iOS’” means that Xcode cannot complete the mandatory signing step for the iOS application target.
Start by selecting the correct development team in Signing & Capabilities and enabling Automatically manage signing.
If the error remains, verify the signing certificate and private key, provisioning profile, Bundle Identifier, CODE_SIGN_STYLE, CODE_SIGNING_ALLOWED, Debug and Release differences, and the signing settings of all extension targets.
If the problem occurs only in CI or with xcodebuild, make sure that the build environment itself contains the required certificate, private key, provisioning profile, team information, and correct Bundle Identifier.
