IOS Signing Errors for Building for IPhone - ios

I made a game with Unity and used the IOS Export option on my windows machine, and then I copied over the Xcode project to test it on my device before I try and release it. I have a free developer account, but it keeps giving me the error:
Failed to code sign 'Unity-iPhone'
No valid signing identities (i.e. certificate and private key pair) matching the team ID “9P75XXXXXX” were found.
Xcode can attempt to fix this issue. This will reset your code signing and provisioning settings to recommended values and resolve issues with signing identities and provisioning profiles.
There is then an option to "Fix Issue" but once I click that, I get the error 'Could not generate key pair for CSR'
I have tried other fixed for the Could not generate key pair for CSR Error, but when I go into my Keychain Access and try to request a certificate from the certificate authority, I go all the way to the end, but then I get the error "User Interaction is Not Aloud".
What can I do to fix this?

Related

Xcode signing error No signing Certificate

Having recently updated my Mac, I have had lots of login problems, eventually when I was able to login, Xcode is giving me the error:
No "iOS Distribution" signing certificate matching team ID "L435GR2VGD" with a private key was found.
How can add a private key to a cert?
One option is if you have it exported to imported in the keychain.
But most probably you don't have it and you should generate new one in developer.apple.com > Cerificates

Unable to Code sign iOS application due to duplicate distribution certificates with different private keys

We have two iOS Distribution certificates for Project A and Project B. I´m having some issues with signing because both distribution certificates have the same name but with different keys.
If I add both certificates and try to sign with one of them for Project A I get an error message that says below.
Code Signing Error: Provisioning profile “NTT One Dev" doesn't include signing certificate "iPhone Distribution: NTT LLP".
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
For Project B I can sign the app without issues even if I had two distribution certificates with same name. I have to remove the newly added certificate from Keychain access to sign the app for Project A. This makes signing an application a time consuming task as I have to export/import certificates every time I want build apps.
Does anyone know of a way of changing the name of the Distribution certificate that Apple generates or how can I resolve this issue without removing certificates?
Best regards
Naga
Issue resolved after removing the old certificate and modified the provision profile for Project A to use same certificate used by Project B.

Delphi [PAClient Error] Error: E0264 Unable to execute '"/usr/bin/codesign

Trying to deploy a Delphi 10.2.2 application to iOS gives these errors:
[PAClient Error] Error: E0264 Unable to execute '"/usr/bin/codesign" --deep -s "iPhone Developer: Wayne Smith (PJ7R7645WB)" -f "/Users/waynesmith/PAServer/scratch-dir/wsmith-WayneTemp/Project1.app"' (Error 1)
[PAClient Error] Error: E0264 /Users/waynesmith/PAServer/scratch-dir/wsmith-WayneTemp/Project1.app: unknown error -1=ffffffffffffffff
When you run codesign on a new certificate for the first time, macOS will prompt you for your admin name/password. 
If you select "not allow", you will get the error -1 too, and that's the error you are getting from Delphi also.
Also check:
Apple posted a collection of code signing problems (and some solutions) in a new document: Technical Note TN2407 Code Signing Troubleshooting Index
Check the CODE_SIGN_IDENTITY property in your build settings. Is your provisioning profile selected there?
You also need to enter a valid bundle identifier in your apps .plist.
The identifier has to match the one you provided when generating the profile.
Apple has a technote about that here.
When you use XCode to build a sample, and you get this error, if you right-click the error message in Xcode and choose expand to get more details, do you get a description of the problem? For example, you may have two copies of your developer certificate with the same name in different keychain files, and Xcode couldn't figure out which one to use?
Check if you have any expired certificate on my System keychain. Keychain Access doesn't, by default, show expired certs. You need to go to System keychain, and make KA tell you about expired certificates, then delete the expired one that is colliding with your proper certificate on the login keychain.
5. Check in Keychain Access, if the actual Apple WWDR certificate is marked as "Always Trust". It needs to be "System Defaults". That goes for your Development and Distribution certificates, too. If any of them are incorrectly set to "Always Trust", that can apparently cause this problem.
So, in Keychain Access, click on the Apple Worldwide Developer Relations Certificate Authority certificate, select Get Info. Then, expand the Trust settings, and for the combo box for "When using this certificate:", choose "System Defaults".
Others have commented that you may have to do this in System and login keychains for these errors.
Try adding --deep to Other Code Signing Flags in Build Settings. More information here: Codesign of Dropbox API fails in Xcode 4.6.3: "code object is not signed at all"
In Keychain Access, Check whether you have selected a provisioning profile which includes the valid Code Signing Identity and a valid Bundle Identifier in Settings. (Goto Build Settings->Signing->Provisioning Profile).
Open Keychain Access and click on lock icon at the top left, so it will lock the login keychain and then again click to unlock.
Goto File->Project Settings->Derived Data and delete your project build folder. After that clean and build your app.
8. Check in Keychain Access if your developer certificates were marked as "This certificate was signed by an unknown authority". If you recently upgraded to a newer Mac OS version and have had a couple of other XCode (4.5.2) issues since then, it could be you do not have the WWDR intermediate certificate installed?  If yes, I download that from the iOS Provisioning Portal, installed in Keychain Access, try again to deploy the project.

Fail to Create a Free iOS Development Provisioning Profile in Xcode 7.3

I have installed the latest Xcode (Version 7.3.1) and want to develop/debug program on real iOS device. I create a new 'HelloWorld' program and get this following error when run in iphone
Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) were found.Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) were found.
After some googling, I need to create certificate. I tried two approaches.
add appleID in Xcode->Preferences->Accounts.
It shows:
the image is here
It always shows 'Loading...'. And the Button 'View details' is locked. I have no idea.
Request certification from certification authority using Keychain Access
I have create a request and save in Disk. And then I login APple Developer Center and Apple Development Agreement pop out when 'Acounts' card is clicked.
I agree and click 'Submit'.I get this error:
the image is here
I tried any times. And also tried both in chrome and safari. It has no effect. I have no idea. Any suggestion will be much appreciated!

Signing iOS xcarchive with a new provisions

I have an xcarchive file that some changes made to him and I want to sign it for distribution. (It already was signed with our certificates)
When I first tried it after downloading all certificates and provision from Apple I got an error :
Xcode attempted to locate or generate matching signing assets and
failed to do so because of the following issues: Your account already
has a valid iOS Distribution certificate........ You can also revoke
the current certificate and request one again.
In my member center I had 2 provisions for Enterprise, I revoked the last one and generated new one.
Now I getting a new message :
No matching provisioning found for "Applicataions/myAppName.app None
of the valid provisioning profiles allowed the specified entitlements:
application-identifier, beta-report-active, keyachain-access-groups.
The selected team "my team..." is different from the team "6hjfhGHR44"
originally to build this item.
How to fix this problem?

Resources