Xcode iOS Development signing identity - code-signing

I have a problem getting a iOS Development signing identity into Xcode. I have tried loads of things to get it working but I keep failing.
I have went the automatic way and let Xcode do it all but I kept going in circles where Xcode kept saying:
No signing identity found. Xcode can request a new iOS Development
signing identity for you.
Followed by:
Your account already has a valid certificate. If you have your signing
identity on another Mac, you can import a developer profile. You can
also revoke the current certificate and request one again.
I have done many steps:
Removing my account from within Xcode's preferences.
removing everything from the key chain app.
clearing everything from within the developer member center (apple developer website)
removing all provisioning profiles
removed my device
revoked all all my certificates
restarted Xcode to perform a 'Clean' project from the Product menu.
even went into my project.pbxproj file to clear anything related to PROVISIONING_PROFILE
removed all provisioning profiles from my device.
After this I went back into Xcode:
added my account into the preferences section
clicked View Details
did a refresh
Xcode automatically creates two certificates
Xcode automatically creates provisioning profiles
Xcode only creates a single Signing Identity: only for iOS Distribution.
This is my problem: I can not get an iOS Development signing identity.
After not getting it to work I went the old fashion manual way:
first clearing everything like the above
created new certificates manually, downloaded them and added them to the key chain app.
created new provisioning profiles manually, downloaded them and dropped them onto the xcode app icon.
At the end the result is the same; When I am in Xcode > preferences > accounts > view details:
I do have a distribution signing identity
I do NOT have a development signing identity
When I click the + button under the Signing Identities and choose 'iOS Development' nothing happens..
I have found lots of posts here on StackOverflow, I tried their suggestions but it won't work for me. Examples of other posts:
here, here and here
I am working with the latest version of Xcode: 6.2.
I am working on an app which is already in the App store.
Edited:
I have also changed the code signing build settings of my project and target into Don't code sign and put it back to iOS Distribution for ad-hoc and iOS Development for Debug.

Together with a very helpful person on the Apple Developer forums we have tried to figure this out.
I was so blinded by it not working, it never came to mind to try out and build another project and to see if that would work. I was completely focused on my certificates and profiles within the member center and my account details within xcode.
When I did try to build another (random) project, it worked in one go. This told us it must had something to do with the Build Settings of that one specific project which xcode could not code sign.
At the end, in xcode I went to the Build Settings of my Target. Within the Code Signing section I changed the values of Any iOS SDK to point to a specific Identity in my Keychain instead of having them on automatic (iOS Developer / iOS Distribution).
This fixed my issue and I was able to build/deploy to my device and I was able to upload a new build to iTunes Connect.

It takes a long time, and we did all the above solutions and they didn't work at all so our team decided to remove Pod files and run pod install again. finally, our OTA uploaded ipa installed on the user's device.
best Solution
clean project menu > Product > Clean Build Folder and /Users/{you user name}/Library/Developer/Xcode/DerivedData
go to your project directory and remove Podfile.lock ,Pods
folder,pod_***.framework
run pod install again

Brabbeldas, did those build setting changes end up getting the iOS Developer certificate showing in the Xcode > Preferences > Accounts > (your account) > View Details > Signing Identities pane?
There was a transient certificate generation issue resolved yesterday (March 26) at around 2:30PM PDT which restored missing Organization Unit fields to iOS developer certificates that also exhibited this symptom (missing developer certificate in the accounts > view details > signing identities pane).
If it's still missing you are probably still affected by this problem. To confirm, double click your iPhone Developer certificate in Keychain Access. The issue is still present if the certificate is missing its Organization Unit field. If your Organization Unit field is present, you're fine. The Organization Unit should be set to the value of your Team ID.
The full symptoms of this problem are:
iOS Developer certificate either shows as Revoked, or doesn't show at all in the Preferences > Accounts > (your account) > View Details > Signing Identities pane.
frameworks signed with the certificate fail to load with dyld: Library not loaded: [your_signed_framework]
Since the certificate server issue is now fixed, resolve the problem with:
revoke affected developer certificate on the website
click the "⟳" button in Xcode > Preferences > Accounts > (your account) > View Details
regenerate any custom developer profiles on the website, download and install those into Xcode
As an additional way to diagnose the problem with signed frameworks, use codesign -dvvv your_signing_framework.dylib. The TeamIdentifier field will be not set for affected certificates instead of your Team ID.

Related

Xcode 8.3.2 signing errors

I have Xcode 8.3.2 on Sierra. I am trying to build an Enterprise .ipa (have Enterprise membership).
I am having issues signing my app. Specifically in Xcode I have the following under General\Signing:
Automatically manage signing is enabled
Team: "My Team (Enterprise)"
Provisioning Profile: Xcode Managed Profile
Signing Certificate: iOS Developer
Status
Failed to create provisioning profile "com.myapp" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
No profiles for 'com.myapp' were found. Xcode couldn't find a provisioning profile matching 'com.myapp'.
My steps were:
Logged into Enterprise account at https://developer.apple.com/account/
Under Certificates, Identifiers, and Profiles I selected the Add
Selected In-House and Ad Hoc
On my MAC in the Keychain Access I selected KeyChain Access\Certificate Assistant\Request a Certificate from a Certificate Authority
Saved to my desktop
In https://developer.apple.com/account/ I uploaded the certificate signing request
I see it as a certificate as type iOS Distribution with and expiration date
I download the .cer file and double click on it to install it
Within Xcode\Preferences I find the Team under the Apple ID and under Manage Certificates I see iOS Distribution Certificates and Enterprise with today's date
I select the Download All Profiles for that team
In Xcode I select General\Signing and "My Team (Enterprise)
At this point I get the two errors described above.
I am new to Xcode development so I am sure there is something wrong with my steps.
Any insight would be greatly appreciated.
Well the solution to my issue was to do the following:
In Xcode under the "General" tab to disable Automatically manage signing
At https://developer.apple.com/account in my enterprise account under provisioning profiles I created a new distribution profile
Downloaded the profile => .mobileprovision file
Double clicked on the .mobileprovision file
With Automatically manage signing disabled I then selected the Provisioning Profile I just created and downloaded in the drop downs for Signing (Debug) and Signing (Release)
At this point I was able to archive and export an enterprise .ipa
This is the solution to my issue that's similar to this one:
Change your bundle identifier to a unique string to try again.
Your bundle identifier is already in use by other developers I guess, so just change your bundle identifier in the Identify tab right above your Signing tab to another one:
For example:
Bundle Identifier: org.react.native.example.RamenForLifeIn2022
Hope this helps :)

Xcode 8: Your account does not have sufficient permissions to modify containers

I'm getting this error with code signing with Xcode 8:
Your account does not have sufficient permissions to modify containers
What does it want from me?
I also faced this issue in XCode 8.3.3 (8E3004b). I just went to Project Settings → Capabilities tab, then toggled iCloud off and on. Once I went back to the General tab, the errors were gone.
This seems like it may be a bug with XCode 8.
To resolve this, I unchecked the "automatically manage signing" checkbox in the of my target's General settings. I then archived my project by manually setting the provisioning profiles. After that succeeded, I went back and again checked the "automatically manage signing" checkbox and it stopped complaining with errors that made no sense.
Just had this issue with XCode 8.3.2 after we enabled iCloud Capabilities and the entitlements changed. We use automatic signing - xcode managed profile. Going into Xcode -> Preferences -> Download All Profiles wouldn't fix the problem UNTIL we temporarily made team members Admin and repeated the process. At that point XCode realized the new provisioning profile and the problem was solved.
Just goto Xcode capabilities section and see if any of the capability showing error then disable that and enable again. Then come to your Signing section in General. The issues will go now
1) Remove all automatically created provision profiles from
~/Library/MobileDevice/Provisioning Profiles/
2) In Xcode 11.1 and higher remove and add capabilities
I faced this issue in XCODE Version 8.3.3 (8E3004b). To resolve this go to project settings. In capabilities tab -> iCloud -> containers. Verify whether valid iCloud containers are selected and you have permission to access these containers. This should resolve the issue.
I was having the same problem too after I added a new device with Xcode 8.3.3 (same issue present in Xcode beta 9.0 as well). My Apple Developer account wasn't an administrator at the time either. I tried deleting my provisioning profiles and re-downloading them but that didn't work. I tried manually downloading and installing the provisioning profiles from developer.apple.com, but that didn't work either. I had my Apple Developer account made an Administrator following advice from dchappelle https://stackoverflow.com/a/43812123/5760384 and voila! The provisioning errors went away. (I'd reply to his post, but I don't have enough reputation.)
Full text of error:
Your account does not have sufficient permissions to modify
containers. Provisioning profile "myApp" doesn't include the currently
selected device "myDevice". Code signing is required for product type
'Application' in SDK 10.3
Another potential solution, depending on your needs, is to upgrade to the paid version of the Apple Developer Program; this gives you access to the iCloud container features. Once paid and activated (the membership application takes a few hours to go through if you're an individual... sometimes a few days if you're a business) you'll need to enable iCloud features via the online dashboard or via XCode as per Apple's instructions. You may then have to restart XCode.
I had the same issue with Xcode 9.2. But in my case, the problem was in Keychain: my dev certificate was saved into login keychain by default. I was able to build an app on a device only when I moved it to System keychain.
So the steps are next:
Open Keychain Access
Open login keychain (you can see the list of all keychains on the left top corner of the window)
Drag and drop your dev/distribution certificate into System keychain
You may need to input password.
PS: while doing this steps you also may need to unlock locks on the keychains.
I had this problem and I fixed it by logging in to the iTunes development portal and accepted the new Terms & Conditions. I was basically locked out until these were accepted.
I was getting this error because I was in another team (my university team account), which was severely limiting my access to developer.apple.com features. Once I left that team (I added an answers here because even this was a bit of a pain), I was able to remove & re-add my account to XCode. It then worked.
EDIT: It happened again on a new machine (an M1 mac), and this time I had left the university account. By removing and adding back "Apple Pay" capability in Signing & Capabilities, it immediately fixed itself.
None of the other answers worked for me. E.g. The app doesn't even use iCloud, and enabling-disabling it didn't help. Deleting profiles, revoking certificates, disabling/re-enabling automatically manage signing also didn't help.
Go to Xcode -> preferences -> Accounts.
Remove your Apple ID & login back. Refresh the signing in on your project target
I had the same issue using Xcode 9.3
Solution:
1 - Deselect "Automatic manage signing"
2 - Created a Provisioning profile for dev and dist and added in Keychain.
3 - Again when you come back to Sighing (debug and release) you can see your created provisioning profile in a dropdown
4 - Crate archive by selecting "Generic iOS devices" in the project schema

XCode is unable to create a distribution signing identity

I am trying to submit my app to iTunes Connect. I have submitted it before(TestFlight) but at some point my certificates have stopped working. I have tried to renew them with 2 different approaches without any success.
Approach 1: In XCode I get the error that says that the developer profile already has a distribution certificate and suggest me resetting it. Resetting results in the same pop up window so this goes into a loop and does not work.
Approach 2: If I create the certificates and profiles manually in developer portal the archiving process only works if I select the correct identities in the build settings, otherwise the build fails and XCode says that it can not find code signing identities. But I cannot submit the archive because the following error occurs:
I have also tried exporting the .ipa from the archive(to upload it with Application loader) but this does not find the signing identities as well with the same error:
So now I am trying to go the suggested route where XCode is supposed to do all the work for me.(https://developer.apple.com/library/ios/qa/qa1814/_index.html) For a clean slate I have deleted all certificates, key-pairs and provisioning profiles from my mac and developer center.
I have removed all relevant keypairs and certificates from keychain. I have deleted all the provisioning profiles from my mac. I have also deleted all certificates and profiles from the developer site. I have also deleted and re-added the developer account in XCode settings.
I set the project's build settings:
I also set the team in general tab.
Now I guess XCode is supposed to fix my signing issues but after I press fix issues below the team option in general tab
I still go to the reset development/distribution certificate loop.
One thing I notice is that XCode does generate a key-pair to the keychain but not the certificate.
How can I upload my app to iTunes Connect with or without these problems?
Im using XCode 7.2 and this is a Unity3D app.
I have removed all relevant keypairs and certificates from keychain
Okay, but that is what Xcode is complaining about (each time it says "but it is not installed locally" in all the messages you have displayed). You need the private/public certificate pairs in your keychain. If you deleted the private half of the certificates, that is a huge mistake, because you can never restore it (Apple does not have it — it is private). You now will probably have to start all over again by throwing away absolutely everything — all certificates, all provisioning — both locally and at the member center, and beginning from scratch.
This can be done, but it is not trivial, because if you launch Xcode while any remnant remains, Xcode will try to install the certificate back into your keychain. To do it, you would need to delete everything from the keychain, mobile provisions folder, and member center, with Xcode not running.
I managed to upload the package by extracting the .ipa from the archive with
xcodebuild -exportArchive -exportFormat ipa -archivePath {path-to-xcarchive} -exportProvisioningProfile {“profile name”} -exportPath ~/Desktop/MyApp.ipa
and then uploading it with Application Loader.

Xcode : Even though iTunes Connect shows a Developer as well as distribution profile, Xcode doesn't download the Developer profile

Now, I have both, a Development as well as Distribution certificate when I view my Apple Developer portal at developer.com/ios . But when I view the certificates via Xcode, I just get the Distribution profile now matter what I try . Please provide a solution to get the Development profile in Xcode
I have tried creating a Developer profile using Xcode itself, but to no success.
I have one device added to my device List
Download the provisioning profiles and save them to somewhere you can access them. Then, double-click the profiles and certificates. This should bring up Xcode as well as Keychain. You can dismiss the windows and that should work.
In Xcode, go to build phases and check that under Development and Distribution certificates the corresponding ones are correctly filled in.

Taking over an Xcode iOS project: code sign error

I've been asked to take over an iOS development project, and was sent the project files.
I manage to run the project on the simulator, but when I try to run it on my own iPhone, I get an error saying:
Code Sign error: The identity 'iPhone Developer: former developer name (XXXXXXXXXX)' doesn't match any valid certificate/private key pair in the default keychain
How do I take over the project and run it on my own hardware?
Thanks.
You need to add your own developer certificate to xCode. If you've done that and it still doesn't work, I've had success manually removing all references to previous provisioning profiles and developer certificates by opening the xcode project file in a text editor. Normally you don't have to do that, but sometimes it's the only way I've been able to clear out a problem. See: provisioning profile hell

Resources