Conflict archiving my Cordova App on iOS - ios

When I try to make an archive for iOS using xCode for my Cordova App, I have 2 errors message :
TheApp has conflicting provisioning settings. TheApp is automatically signed, but code signing identity iPhone Developer: mail#mail.com (NUMBER) 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'
I don't understand what I have to do...

In the "build settings" , try to find Code signing section, in this you have some parts as code signing identity
In the part for developer set this to iPhone Developer , not the one your name mentioned in .

As you are using Cordova CLI you should do the signing with the CLI too.
But if you want to use Xcode, you have to open the build-release.xcconfig file located at Resources/config and remove the two lines with iPhone Distribution value

Related

How to fix code signing error in Xcode 11?

I keep getting this error. I tried everything.
Code Signing Warning: "OSCSender - App" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Code signing is required for product type 'Application' in SDK 'iOS 10.0' - StickerPackExtension requires a development team error
An empty identity is not valid when signing a binary for the product type 'Application' in xcode version 10.2
I also tried to switch from the new build system to legacy. I have turned on/off automatic signing.
I deleted all provisioning profiles, certificates and my account from Xcode. still the same problem!
I tried to turn off code signing from the .plist but it doesn't let me, even when I run as admin.
Catalina 10.15.2
Xcode Version 11.3
It happens when Xcode doesn't recognize your certificate.
It's just a pain in the ass to solve it, there are a lot of possibilities to help you.
But the first thing you should try is removing in the "Window" tab => Organizer, the provisioning that is in your device. Then re-add them (download them again on the apple website). And try to compile again.
By the way, did you check in the Project Info Window the "code signing identity"?

Xcode Check Dependencies Error: OneSignalNotificationServiceExtension requires a provisioning profile

I am brand new to Xcode but paid for GoNative to turn our web app into a native mobile app. When following the instructions on GoNative and using the OneSignal extension I am getting the following error when I try to Archive the app or when I click Play button to test. I looked in the project editor and I can't seem to find how to get around this error. I have my iOS certs in xcode but don't know how to add the provisioning profile to the dependency.
Error:
OneSignalNotificationServiceExtension requires a provisioning profile.
Select a provisioning profile for the "Debug" build configuration in
the project editor. Code signing is required for product type 'App
Extension' in SDK 'iOS 10.3'
UPDATE:
When selecting Onesignal as target I have the following selected (no option for automatic)
Go to your Xcode Settings -> General and observe targets like this. Select OneSignalNotificationServiceExtension target and checkmark automatic sign in if you did same for main app also. Otherwise, select provisioning profile related to your app.
The Same solution is given in GoNative Support. Check it out: GoNative Support

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

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.

Code signing error in Xcode 8

I want to run my app on my device instead of on the simulator, but every time I try to run it, I get a code signing error:
'AppName' requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
I added a provisioning profile to the build settings under 'Code signing' but I still keep getting this error. Is there something wrong with my provisioning profile or am I looking in the wrong place? By the way, I used this provisioning profile on the previous version of Xcode and never ran into any problems.
To fix it, I set > TARGETS > General tab > Signing > Automatically manage signing = CHECK MARK
I had a similar problem and it was because my iPhone Developer certificate had expired. You can check this with the Keychain Access app in Utilities.

iOS8 Dynamic Frameworks -> CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'

I am using the iOS8 Dynamic Frameworks that I build myself and link within my iOS app. It was working fine in the simulator and on device, but when trying to archive a Release build for it, I keep getting this error:
Code Sign error: No matching provisioning profiles found: None of the valid provisioning profiles allowed the specified entitlements: com.apple.developer.ubiquity-kvstore-identifier, keychain-access-groups, com.apple.developer.icloud-container-identifiers, com.apple.developer.icloud-services, com.apple.security.application-groups, com.apple.developer.ubiquity-container-identifiers.
CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'
Within the app target -> Build Phases -> Embed Frameworks -> the framework is linked there, and "Code Sign on Copy" checkbox is checked.
Within the framework target -> Build Settings -> I have set Provisioning Profile to "Automatic", and for Code Sign Identity, under Release, I am using "iOS Distribution"
I have 3 different app targets that need to build off this Framework.
I'm confused:
does the framework need it's own AppID registered in the Developer Center?
does the framework need it's own Provisioning Profile?
can the framework use the same Entitlements file from the iOS app target?
Thanks.
I had the same problem but fixed it by:
Setting the team to None in the General tab of the target settings.
Changing this value seems to also reset the code signing params in the build settings, to 'iOS Developer' for both debug and release. If it doesn't then change these params yourself.
I can now build my framework with no errors.
The newly built framework can be checked for signing by entering codesign --display --verbose=4 FRAMEWORK_PATH into the terminal.
This tool should return: code object is not signed at all
The framework does not need its own app ID registered in the developer center, provisioning profile, or entitlements. I have an app on the app store that contains an app target, a today extension target, watch extension targets, and a framework target for shared code.
I was encountering this issue with a second app I was attempting to setup a build for, and I was able to resolve it by changing the signing for my framework to use automatic settings instead of "Don't Code Sign" (iOS Developer identity / Automatic profile). This causes the error to go away and the framework still seems to be resigned during the archive as one would expect. It seems that some build settings are required, even if it is just going to resign.
EDIT: It's worth mentioning that once you set it to automatic, you must also have a provisioning profile installed that is appropriate for the bundle id set for the targets being built (a wildcard development profile should suffice).

Resources