I get conflicting provisioning settings error when I try to archive to submit an iOS app - ios

Now I'm trying to Product>Archive my iOS app to submit. However, I am getting following errors:
AppName has conflicting provisioning settings. AppName is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to iPhone Developer in the build settings editor, or switch to manual signing in the project editor.`
Code signing is required for product type 'Application' in SDK 'iOS 10.1'`
The situation won't change even those I've retry a whole process to recreate iOS certificates or provisioning profile.
I was setting as iOS Distribution in TARGETS > Code Signing Identity > Release > Any iOS SDK. When I changed the setting as iOS Developer here, and changed the setting in PROJECTS > Code Signing Identity > Release > Any iOS SDK as iOS Distribution, I've succeeded in archiving. I'm wondering is it necessary to set as iOS Distribution in the target editor or not. And if it's mandatory, please someone let me know how can I work around this error.
My XCode version is 8.1.

I had this same error, but I had already checked "Automatically manage signing".
The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.

I had the same problem, I noticed that If you want to make a release of your iOs app and publish it on the App Store you don't need at all to put in the "Code Signing Identity" as release, just keep it as iOs developer.
Go to Your project -> Build Settings -> Code Signing Identity and put everything to iOs developer.

For those coming from Ionic or Cordova, you can try the following:
Open the file yourproject/platforms/ios/cordova/build-release.xcconfig and change from this:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
into this:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
and try to run the ios cordova build ios --release again to compile a release build.
Reference: https://forum.ionicframework.com/t/ios-build-release-error-is-automatically-signed-for-development-but-a-conflicting-code-signing-identity-iphone-distribution-has-been-manually-specified/100633/7

You are way over-thinking this. The process is vastly improved and extremely easy in Xcode 8. Take advantage of that fact.
Step One: Do not, in any way, shape, or form, attempt to set the Code Signing settings in the Build Settings. Don't go near them. You will absolutely mess this up. Instead, edit the target and do all the work in the General pane. Best approach: set yourself up for automatic code signing - just enter your Team and check the checkbox, like this:
Step Two: Make sure you have an iOS Distribution Identity (Certificate). You can check this under Xcode Preferences > Accounts, View Details. It would also be a good idea at this time to go to the member center and get yourself an App Store mobile provision for this app, and download and install it.
Step Three: Choose "Generic iOS Device" as your Destination, and choose Product > Archive. The app will be compiled, the archive is created, and you are now ready to submit to the App Store.

If you get this error
App has conflicting provisioning settings.
App is automatically signed, but provisioning profile 'ID' has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.
then make sure that you have empty PROVISIONING_PROFILE option in Target Build Settings:

Don't forget to do this,
Select the Project -- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.

If you are from Ionic world. You might get a "conflict code signing" error when you in the "archive" stage, as below:
... is automatically signed for development, but a conflicting code
signing identity iPhone Distribution has been manually specified. Set
the code signing identity value to "iPhone Developer" in the build
settings editor, or switch to manual signing in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS
10.x'
In this case, please go to Build Settings/under signing, code signing identity, and select both as iOS Developer, not Distribution.
Go to the menu: Product/Archive again, then the issue will be fixed.

For those coming from Ionic or Cordova, you can try the following:
Disconnect your ios devices from the computer before ios cordova build ios --release (seems to change the targeted device for xcode signing).

The only solution worked for me:
Close Xcode project
Using finder go to project folder
Right click on .xcodeproj and choose "Show Package Contents"
Right click on project.pbxproj go on "Open With" and choose TextEdit
Now search for your Provision Profile instanceId specified in the error message.
Delete all found texts and let Provisioning Profiles clean.
Save & Close
Open Xcode
Enable automatically manage signing
Enjoy! Hope it will be useful!

Go to build settings, search for code signing identity, and set Any iOS SDK value for iOS Developer:

For me change Code Signing Identity to all iOS Developer for both of Debug and Release.
And Code Signing Style to Automatic.

In my case, i set the "automatic" option in Build Settings.

I was struggles long time, I tried all proposed solutions. Nothing work for me.
Then I found the issue: there was a "User Defined Settings" for "PROVISIONING_PROFILE" at the end of Build Settings tab. I delete it for both Project and Target build settings. Then Automatic signing worked perfect.
I hope this will help somebody else. :)

This worked perfectly for me.
Step 1:
Select the Project Target-- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.
Step 2:
Uncheck "Automatically manage signing", then check it again and reselect the Team. Xcode then fix whatever was causing the issue on its own.

Try either of the following
1.Removing and adding ios platform and rebuild the project for ios
ionic cordova platform rm ios
ionic cordova platform add ios
ionic cordova build ios --release
2.Changing the Xcode Build Setting
The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.
3.Change the following code in platform
This didn’t make any sense to me, since I had set the project to auto sign in xcode. Like you, the check and uncheck didn’t work. But then I read the last file path given and followed it. The file path is APP > Platforms > ios > Cordova > build-release.xconfig
And in the file, iPhone Distribution is explicitly set for CODE_SIGN_IDENTITY.
Change:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
To:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer

Find .xcodeproj file and open it with a text editor
Find fields below and make them like this
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";

General -> Signing -> check automatically manage signing and select team
Build settings -> Signing -> Code Signing Identity -> SET ALL TO "IOS developer"

Only thing worked for me.
Open the project -> Select your target -> Go to Build Settings -> Search PROVISIONING and delete the selected profiles.

In my case I had to login to Apple Developer Website and reset the list of devices.
It appears they now require you to do it every year when the subscription is renewed, before being able to add new devices and generate certificates.

I had the same problem
Mine was fixed by searching for "provisioning profile" in the build setting of share extension
Then there was two "Provisioning Profile"s fields there, one regular and one deprecated. The regular one was on Automatic but the deprecated one was not. Changing that one to Automatic too fixed my error.

For me, I had dragged the dump_syms binary and a bunch of scripts into my build target when I manually installed the Firebase SDK. Removing those from my target and project solved the issue.

Using Xcode 10: None of the other solutions here worked for me.
I had to revert to Xcode 9 to resolve this issue, and then update back to Xcode 10 so I could run my application on iOS 12 on a non-emulator device.
Any other solutions found on Stack Overflow or elsewhere, used in Xcode 10, sent me into an endless cycle of provisioning conflicts or signing certificate issues. It seems like signing is broken in Xcode 10 whether you're using the automatic method or manually selecting provisioning profiles and certificates.
You can revert to Xcode 9 by first deleting Xcode 10 from your Applications folder. Then, install Xcode 9 using the .xip file listed on this Apple Developers page.
In Xcode 9, use the automatic build option. You may have to uncheck 'Automatically manage signing' and reselect it, and you also may be required to revoke an existing certificate at developer.apple.com.
After you get the app to successfully build in Xcode 9, you can update back to Xcode 10 using the App Store. After reopening the application in Xcode 10, everything still worked. You may not need to do this, but I needed to in order to build for iOS 12 which requires Xcode 10.

I opened the project file in a text editor "Atom" then I searched for the provisioning profile id and deleted it.

The problem is in the Cordova settings.
Note this:
iPhone Distribution has been manually specified
This didn’t make any sense to me, since I had set the project to auto sign in xcode. Like you, the check and uncheck didn’t work. But then I read the last file path given and followed it. The file path is APP > Platforms > ios > Cordova > build-release.xconfig
And in the file, iPhone Distribution is explicitly set for CODE_SIGN_IDENTITY.
Change:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
To:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
It a simple thing, and the error message does make it clear that iPhone Distribution has been manually specified, but it doesn’t really say where unless you follow the path. I looked and fiddled with xcode for about three hours trying to figure this out. Hopes this helps anyone in the future.

Another cordova/ionic possible cause of this is if you're using the common branch-cordova-sdk plugin.
For some reason the plugin was overwriting code signing identities that had been correctly set in build.json when running ionic cordova build ios.
I tracked it down to identities that have been set in /plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js file
Make sure the debug and release vals are both set to "iPhone Developer" and this will save you having to do a manual fix in XCodes Build Settings after every build process
const DEBUGCODESIGNIDENTITY = "iPhone Developer";
const RELEASECODESIGNIDENTITY = "iPhone Developer"; // NOT "iPhone Distribution"
This doesn't happen on a different machine with same project/plugin so unsure precise root cause but sharing in case it helps others as this ate up a few hours.
It was found by searching for occurrences of "iPhone Distribution" in the project folder. Do the same to identify any other plugin/library that might be interfering for you.

Change your code sign in to destribution certificate .

After updating to Xcode 8.3.2 i had the same error with a Cordova project. I needed to upgrade Cordova (v7.0.0) and the iOS platform (v4.4.0) for code signing to work.

You need to add a Production Certificate and (or) Download one from your Development Acoount

Please make sure the "Product Bundle Identifier" in Build settings name matches actual bundle identifier.This worked for me.

For me, I need to switch from auto to manual, and switch to auto, same error. Switch to manual, and change those provisioning profiles and code signing settings and build and get errors, and switch back to auto, then it just success.

Related

Xcode 10.1 signing problems for the iOS Qt kit [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Xcode has conflicting provisioning settings

I have an Ionic 2 app, which builds and is testable in Xcode 8.2.1 Simulator environment, e.g. iPhone7 (Build Successful).
When I try Archive the app to create an ipa file to set on a device, I follow these instructions. But Product -> Archive is greyed out. So I change the active scheme to Generic iOS Device.
But then when I click Product -> Archive, I get Build Failed.
theWhoZoo has conflicting provisioning settings. theWhoZoo is
automatically signed for development, but a conflicting code signing
identity iPhone Distribution has been manually specified. Set the code
signing identity value to "iPhone Developer" in the build settings
editor, or switch to manual signing in the project editor. Code
signing is required for product type 'Application' in SDK 'iOS 10.2'
If anyone could advise how I can fix this to build an Archive, I would appreciate it.
This worked perfectly for me. Give a try :)
Step 1:
Select the Project Target-- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.
Step 2:
Uncheck "Automatically manage signing", then check it again and reselect the Team. Xcode then fix whatever was causing the issue on its own.
The problem is in Code Signing Identity. This is a new problem that showed up on the latest release of Xcode. Go to Code Signing Identity, then add other and type in "iPhone Developer" as shown in the error message and save then this will display.
If this does not work show me your General signing. and your Code Signing Identity from both your Project and your Targets
The problem is in Code Signing Identity. This is a new problem that showed up on the latest release of Xcode. Go to Code Signing Identity, make all IOS Developer rather that IOS distribution.
UPDATE Just figured out the real issue [assuming that your app has the correct provisioning profiles, but a target for your app does not]: Navigate to your target and change the provisioning profile there. See below:
I got this error when I added a target to enable rich push notifications. The project/workspace, "Spontit" did not have this error but the target "RichNotification" did.
I tried several things, and the last thing I did, that seemed to be responsible for it finally working, was:
Un-add and re-add the embedded binary for the target "RichNotification" in the "General" tab of the project, "Spontit".
Another thing to check is to make sure that it is added as a "Target Dependency" in the "Build Phases" tab.
For this particular problem, make sure to clean your project (Cmd Shift K) before building it, every time. Otherwise, you might fix it and try to build it and think it's not working, but really it's using the old settings- so clean it first.
For me Only this worked.I tried changing the Provisioning Profile(Deprecated) Value to Automatic.
This worked for me and I hope it would be helpful
for someone.
Project Target -> Build Settings -> Code Signing Identity -> Change the Debug and Release to iOS Developer and iOS Distribution.
If you have error message like this:
[target name] is automatically signed, but provisioning profile xxxxx-xxxx-xxxx-xxx-xxx has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.
You can fix like this:
1. Check Automatically code sign in
2. Uncheck Automatically code sign in, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own
3. If still not work, find project.pbxproj, search the profile, and just delete that line, then save it.
This work for me!
Close Xcode project.
Using finder go to project folder.
Right click on .xcodeproj and choose "Show Package Contents"
Right click on project.pbxproj go on "Open With" and choose TextEdit
Now search for your Provision Profile instanceId specified in the error message.
Delete all found texts and let Provisioning Profiles clean.
Save & Close.
Open Xcode
Enable automatically manage signing
Source: https://www.codegrepper.com/code-examples/whatever/has+conflicting+provisioning+settings+xcode
I tried multiple things mentioned in stack but nothing worked except above solution.
HERE IS THE FIX
FOLLOW THESE STEPS:
open your project in xcode, in my case I used xcode 9.
INSIDE THE GENERAL TAB DO THE FOLLOWING
UNCHECK THE FOLLOWING OPTION:
Automatically manage signing
THEN SIGN YOUR DEBUG PROFILE
provisioning profile should be your development profile from the dropdown
Team : will be populated because of the above provisioning profile
Sigining Certificate: will be populated.
THEN SIGN YOUR RELEASE PROFILE
provisioning profile should be your release profile from the dropdown
Team : will be populated because of the above provisioning profile
Sigining Certificate: will be populated.
That is all, clean and archive your project.

iTunes Connect submission code signing entitlements error Xcode 8

I am having trouble submitting my newest app update with Xcode 8 GM. I updated my iPhone and watchOS app in this update.
When trying to submit I get the following error:
iTunes Store operation failed. Invalid Code Signing Entitlements. Your
application bundle's signature contains code signing entitlements that
are not supported on iOS. Specifically, value 'QX3TDZXXXX.AppName'
for key 'application-identifier' in
'Payload/AppName.app/AppName' is not supported. This value
should be a string starting with your TEAMID, followed by a dot '.',
followed by the bundle identifier.
I set signing to automatic by checking "Automatically manage signing" in Xcode. Everything looks fine to me.
After searching for a solution everywhere I tried to change the Code Signing Identity in Build Settings to iOS Distribution. That also gives me an error right away:
AppName has conflicting provisioning settings. AppName is
automatically signed for development, but a conflicting code signing
identity iPhone Distribution has been manually specified. Set the code
signing identity value to "iPhone Developer" in the build settings
editor, or switch to manual signing in the project editor. Code
signing is required for product type 'Application' in SDK 'iOS 10.0'
I also:
cleaned project
restarted Xcode
rebooted my Mac
revoked my distribution certificate
Did someone else have a similar problem and knows how to fix it?
Thanks in advance!
What helped me was:
I unchecked "Automatically manage signing" and then check it on again.
After that Xcode told me it would reset the settings to the default and after that it finally worked.
I wasted more than a whole day on this but I finally found the solution!
Somehow in my Build Settings, the "Product Bundle Identifier" was only my apps name instead of the unique Bundle Identifier (e.g. com.YX.AppName).
Click on your project, choose your App, press Build Settings and search for "packaging". You should find it there.
Found this by creating a brand new project and comparing every single setting.
In case this is not what is wrong in your project, these are the things I found on this topic before. Maybe one of these things might help you:
project > Alt + Clean (Cleans the whole Build Folder)
restarted xcode (that helped many others!)
revoked all Provisioning Profiles and let Xcode create new ones (Xcode > Preferences > Accounts > View Details > Create next to iOS Distribution)
checked that all App ID names where right
for com.AB.CDE the name has to be "com AB CDE"
restarted PC
checked that Xcode and macOS were the newest version
Try this solution:
Create new "Provisioning profile" & import it.
Restart XCode
Uncheck "Automatically manage signing"
In the drop downlist select new provisioning profile.
Check "Automatically manage signing".
It should help you.
I had the same issue and none of the suggested workarounds here worked. I assumed it had to do something with how the XCode project is configured, so I tracked back and found out I was following this guide Building multiple versions of a React Native app and had missed the following step.
In the project’s info.plist, change the value of Bundle Identifier to
$(PRODUCT_BUNDLE_IDENTIFIER)$(BUNDLE_ID_SUFFIX)
EDIT : Turns out that was not the actual problem. I had to enable Push Notifications in Capabilities since the App ID on the developer console had it turned on.
Had the same issue. I restarted my laptop, rebuilt the release build, restarted Xcode, rebuilt the archives. Then it worked.

Code signing is required for product type 'Application' in SDK 'iOS 10.0' - StickerPackExtension requires a development team error

I am facing the below issue and am unable to build the application.
XXX has conflicting provisioning settings. XXX is automatically
provisioned, but provisioning profile WildCard has been manually
specified. Set the provisioning profile value to "Automatic" in the
build settings editor, or switch to manual provisioning in the target
editor. Code signing is required for product type 'Application' in SDK
'iOS 10.0'
I am also unable to choose a particular profile.
How to resolve this issue?
Holy molly, I had to do all this in order for it to work. A picture is worth a thousand words.
If you get this error while archiving then continue reading.
Go to your app and click on the general tab. Under the signing section, uncheck "Automatically manage signing". As soon as you do that you will get a status of red error as shown below.
Now here's the tricky part. You need to uncheck "Automatically manage Signing" in both the targets under your project. This step is very important.
Now go under "build settings" tab of each of those targets and set "iOS Developer" under code signing identity. Do the same steps for your "PROJECT".
Now do Xcode → Product → Clean. Close your project in Xcode and reopen it again.
After this go to the general tab of each of your targets and check "Automatically manage signing" and under team drop down select your developer account
Do an archive of your project again and everything should work.
Really, Apple? Was this supposed to make our lives easier?
Great, now we can choose the profile for Debug and Release separately in the general tab itself as illustrated in the image below.
Also when you click on Automatically manage signing it does all process that are created by Fix issue in previous Xcode versions.
Disabling automatic and then re-enabling has solved this for me in Xcode 8 GM seed. This can be done in the project settings, info tab for each target that needs to be signed.
I hate to say it. I just quit Xcode and opened it again. Simple and effective :)
For resovle this issue:
Go to Xcode/Preferences/Accounts
Click on your apple id account;
Click - "View Details" (is open a new window with "signing identities" and "provisioning profiles";
Delete all certificates from "Provisioning profiles", empty trash;
Delete your Apple-ID account;
Log in again with your apple id and build app!
Good luck!
This is what I would call a classically Apple Xcode UX design bug.
The error said there is a bunch of stuff YOU DID WRONG LOCALLY.
The error actually meant "we have a new agreement you did not accept online".
After checking and unchecking the Automatic Signing button I got this agreement error to display:
Signing into the developer portal I was able to see a banner for the agreement update notice:
.
Restarting Xcode 8 then cleared that error and only forced me to reselect the certificate I already had on my machine and tied to the project.
This could have been handled in a less confusing implementation, but this is how I fixed it. I am putting it here because it's way different than the steps everyone else gave.
Oh and yeah, having the pre-latest iOS 10 device and latest Xcode (I was on 7.3.1 or something) also threw errors until I updated.
This is how it worked for me:
Kill Xcode and launch again
Open project again
Clean Project
Go to project settings > general > uncheck 'automatically managed profiles' and than 'check' again it will prompt for enable.
Now try archiving the source code
P.S Killing Xcode and launch again is the best thing to do if facing any random issue
I fixed it doing this:
Set your team for all the targets of your project. Including the extensions. And left the automatic signing management.
Steps:
Under General → Signing
Uncheck: Automatically manage signing
Select Import Provisioning
The Untick-tick (check-uncheck) "Automatically manage signing".) of Xcode checkboxes don't work for me (as many suggested on the top).
It happens with frameworks linked in your project.
Solution:
Find your framework or any other target that required signing.
Go to Build settings
Search Signing Identity
Set Don't code sign manually.
I only needed to uncheck 'Automatically manage signing', check it again, and rebuild.
Click on Add Account if not signed in.
Then after select your team profile and check Automatically manage signing and leave everything else as is in Xcode. It will perform the remaining stuff by itself.
I ran into this type error by updating the Xcode version to 8.0,
and under the Code signing is required for product type 'Application' in SDK 'iOS 10.0'
There is a warning:
isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
My solution is go to the TARGET → General → Signing -> click the Enable signing... button, and I solved the issue.
If you are finding the following screen and facing the problem of code signing required, then one of the following solutions may help you.
Solution 1. As said before, sign in with an Apple ID. Then you will get options like this, if you enter correct bundle identifier. Then select the appropriate profile from the list.
Solution 2. If you don't want to sign in with your Apple ID, then change a small flag in project.pbxproj file. Find the following text in the project file.
/* Begin PBXProject section */
Change flag ProvisioningStyle = Automatic; to ProvisioningStyle = Manual; Refer to the following image. After changing the flag, you will see the options to select appropriate profile from the list.
in Build Setting change in Signing
Clean and Archive your code , Hope it will help you .
Xcode Version 11.0:
I recently upgraded to Xcode Version 11.0.
Looks like Apple moved the Signing to a new tab from the original General tab.
Navigate to the application
Select "Signing & Capabilities"
Click "Enable Development Signing"
Firstly in general tab -> signing section -> select a development team, manage signings
Similarly if you are working with multiple pod files select each pod target separately and go to general tab -> signing section -> select a development team, manage signings
repeat the same process for all pods in your project
Clean -> Build the project.
This worked for me
In unit test target
Xcode 7:
Must have provisioning profiles set (the same as in app target)
Must have "don't sign" under certificates
Xcode 8:
Must have 'None' set for provisioning profiles
Must have certificates set (the same as in app target)
(Must also have 'None' set for deprecated provisioning profiles)
All answers looks fine but i found still issue so i changed settings in Build like this in XCode 9.0 - Sharing it so it could help someone.
After applying all the solutions above, The same issue I was getting. i.e
So I solved this by removing the provision profile in build sending.
Please find the images which will make you more clear
Even when installing the Watch OS application extension, the same error occured in Xcode 8.1:
After updating the Provisioning Profile to Empty in Project of Build
Settings, everything work fine.
&& Code Signing Identity to iOS Developer in every targets Build Settings.
I upgraded to Xcode 8, and iOS 10, but I had the problem.
I fixed it by going to project general tab, signing section.
Click "Enable signing....."
That is it.
If you get this error while compiling in Microsoft Mobile Center
❌ Code signing is required for product type 'Application' in SDK
'iOS 10.3'
** ARCHIVE FAILED **
be aware that Mobile center doesn't yet support automatic signing with certificates of type app-store, ad-hoc and enterprise. Automatic signing only works with development certificates.
There are two things you can do to work around that limitation:
Use a development certificate. You'll have to create a new one in the developer.apple.com portal, download it to your machine, export it to a .p12 file using keychain, then finally provide it to Mobile Center. You know the drill.
Disable automatic signing. You will find that setting in Xcode in your project targets. Once disabled, a little "i" button will be displayed next to the "Xcode managed profile" label. Click that button, some info about the profile will be displayed. On the top left corner of that window, a "PROV" icon is displayed. That is the provisioning profile that you should provide to Mobile Center. Drag and drop the icon into the corresponding field in Mobile Center.
.
I did everything and didn't worked. I uninstalled Xcode 10 and installed Xcode 9.4 then it worked out of the box !
If you still have problem then please try this.
Build Settings -> User Defined -> Provisioning profile (Remove this.)
It will solved my issue.
Thanks
I have tried above all issue but was not working for me
What I tried is
First of all, I want to go with manual code signing process, I am not doing via automatic code signing
I specify team name
Then change deployment target
Clean and build
You will good to go now
1.1: If you are using p12 and a provision file, but not using AppID to log in, do not Select Automatically manage signing.
Which means you don't need to set your team. Just select your provision file and the machine code signing identity in Build Settings, like this Build Settings. Make sure the parameters are set as well.
And then go back to General. You will see General set, and that's OK.
If 1 does not work, try as other answers said, clean your project, delete the derived data folder, quit Xcode, and open again.
Just download your provisioning profile again from your developer account.
And sign out all developer accounts from Xcode → Preferences → Accounts → *Select Account showing at left and press -(subtract sign)
After deleting all accounts, press the + sign (add) button and sign in with all developer accounts.
It will work like a charm...
It is because you have not choosen a team when you created the project.
I am such fixed. And I choose it in build settings, but invalid. I must create a new project.
"I choose it in build settings, but invalid. I must create a new project." is wrong.
It is invalid because I have not chosen it in extension. You must choose a profile at your project's all extension, and there is no need to create a new.
[2
select your target and search for user-Defined section on build Settings,select provisioning profile and delete it

Xcode The executable was signed with invalid entitlements [duplicate]

This question already has answers here:
The executable gets signed with invalid entitlements in Xcode
(40 answers)
Closed 2 years ago.
I would install an application in my mobile phone by using Xcode but it was not installed with following an error message.
Error Message
"The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016)"
Matters of Inquiry
Why does the error message occur while I install the application?
Would you mind if you can give me the solution of this problem?
Check if you are using Entitlement file in Build Setting > Code Signing Section.
If yes, try deleting that file name.
You are using Entitlement file
The entitlements file defines certain capabilities of your app. Usually, the file is automatically generated by Xcode when you enable a capability for your app. You only need the file if you enable certain capabilities, e.g. Healthkit integration. If you'd like to use these features, you have to add it. Otherwise, Apple will reject your app.
To fix this
Go to the build settings of your target.
Make sure that you have "All" selected instead of "Basic"
Type "entitlements" into the search box
The result is the build setting where you can specify where your
entitlements file is located
Remove them
You are using the wrong Provisioning Profile
A provisioning profile is a collection of digital entities that uniquely ties developers and devices to an authorized iPhone Development Team and enables a device to be used for testing. A Development Provisioning Profile must be installed on each device on which you wish to run your application code.
Go to Build Settings > Code Signing > Provisioning Profile
Select a development profile under Team
Please ensure that the Team in the project, target and tests are the same.
Bundle Identifier and App ID do not match
Go to the build settings of your target
Select Packaging and change your App ID to match the Bundle ID
Clear cache in Xcode
Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually.
You are using wrong provisioning profile to build your app on devices make sure you are using right type of profile. I was using App Store Deployment profile to build on devices. Use ad-hoc profiles or development profiles to build on your devices.
You are using the wrong Provisioning Profile i.e. Distribution for development. Go to Build Settings > Code Signing > Provisioning Profile and select a development profile.
Check the if your "Code Signing" configurations are same on "PROJECT>Build Settings" and "TARGETS>Build Settings".
Personnally, I use for both:
- "Code Signing identity": iOS Developer
- "Provisioning Profile" : Automatic
Check your "Team" parameter at your targets. It should be the same for your project and tests.
For me none of the above answers worked. I tried to remove every code signing certificate from Keychain and build the app. When I resolved all code signing related errors for my target I still had some of them in Tests target. It has been set by someone else from my team before. I just switched to iOS Developer, and the invalid entitlement error went away.
I was getting this problem after moving app from one account to another. I tried all the solutions given by others, those might be correct in other cases. But I fixed the problem by going File -> Workspace Settings -> Build System and choosing "Legacy Build System". I'm using XCode 10.3.
I faced this problem and my problem was My Bundle Identifier and AppID was not matched. Please change your Bundle Identifier in Build Settings->Packaging like your AppID.
Just goto Apple developer portal from where you have downloaded provisioning profile.
Select your profile click edit and check whether all certificates are selected or not.
In my case selecting all certificates and downloading that new profile solved the above mentioned issue.
Also make sure in your schema you have set "Build configuration" to the correct configuration, in most cases "Debug".
I got this error when export the ipa with App Store provisioning wrongly during CI process. My intention was to export with Adhoc provisioning.
I had the same error. My problem was that I checked 'Enable HealthKit' in Entitlements.plist, but I did not enable HealthKit when I created the App Id.
In short, all entitlements in your app (Entitlements.plist file in your project) should be configured on the provisioning profile you use (Provisioning profile = app ID + certificate + information about devices your app can run on).
Had the same problem that suddenly popped up in my project from one day to the next.
What fixed it for me was turning "Automatically manage signing" off and on again for both targets and making sure the right development team was selected once it was on again (defaults to none in my project).
It could seems a easy solution but I solved updating my iPhone's iOS version.
All answers I have seen talk only about xcode update. It was strange because my old iOS version was iOS 13.3.3 and it worked on another iPhone with iOS 13.6. After updating to iOS 13.7 it worked.

Resources