iphone developer: no identity found - iphone

My development machine suddenly decided to stop installing to my device this morning, with the codesign process giving the error "no identify found".
I checked my keychain and my developer certificate is there, valid until 2012.
The only links I've found in google talk about developing on a jailbroken phone, which I don't have.
Does anyone know how to fix this issue?

In the build settings for the "target" try reselecting the code signing identity. This often happens when working with more than one developer or if you recently added devices to the provisioning profile.

If any of your Provisioning Profiles expired, update them. If this is not the case, go to your project settings, there you should be able to find the codesign and a bunch of other useful stuff. Change it to the correct one, not the "iphonedeveloper" - the one that has your name in it!

Related

Installing provisioning profile on device does nothing xcode 6

I have a valid provisioning profile, the program I'm running works fine on one of my iPhones. However, for some reason I cannot add it to my other iPhone. Here's how it looks:
Show provisioning profile
Click to add one
Select my provisioning profile
Aaaaaand nothing happens
Has anyone else experience a similar problem or does anyone know what might be the solution? As of just now it just seems that xcode is unresponsive.
Rkey, I had this same problem. If you haven't found a solution, this is how I solved mine.
Instead of trying to install a provisioning profile by yourself, run the app on the device without trying to set it up yourself. Now, if I'm not mistaken, you'll get the "no provisioning profile found for this executable" message or something like that.
You need to change the Code Signing Identities in the build settings of your Xcode6.
Change everything [Code signing identity, Debug, Any SDK, Any iOS SDK, Release, Any iOS SDK)to iOS Developer and set Provisioning Profile to Automatic.
After that, if you try to run the app on the phone again, the prompt will give you an option to "Fix Issue" and clicking on "fix issue" solves the problem.
Hope it works for you.
Go to apple portal and add all the required devices there.
Then go to the provisioning profile you want to download, edit it and make sure the following things:
The App ID associated with the provisioning profile and your App ID in the info.plist is the same.
All the required devices are included in this profile(they are checked marked for the profile).
Check the associated provisioning profile certificate is valid and you have a private key pair for that certificate.
In xcode settings select the provisioning profile and code signing
identity(the certifcate) for the scheme you are running the
application.
Updated answer for XCode 10 ...
See here: https://stackoverflow.com/a/52434756/3216970
Ran into this w/an Ionic app initially created w/XCode 9.
Absolutely none of the usual fixes for automatic/manual profiles or certificates worked.
The issue was with XCode 10's "new & improved" Build System. It just doesn't work w/older projects, and none of the error messages actually explain why.
Go to File -> Workspace Settings.
Change Build System to "Legacy Build System"
Now magically the Provisioning Profiles show up on your device and you can deploy the app you needed to get on a device 3 hours ago when you started messing with this provisioning BS for the umpteen-dozenth time. Thanks Apple.

Xcode 4.3.1 "A valid provisioning profile for this executable was not found"

Tonight I upgraded from Snow Leopard to Lion, and upgraded to Xcode 4.3.1 (iOS 5.1). And now when I try and run debug mode on my device (iPad) I get "A valid provisioning profile for this executable was not found". I have tried every suggestion in past posts on this issue. I have generated a new certificate. I have set my code signing to use the new certificate. I have updated the provisioning profile to use the new certificate. I have gone into the .pbxproj file and deleted all references to the provisioning profile. I have cleaned and closed Xcode a million times. No matter what I do, I still get the same error when trying to run on the device.
In Organizer, the provisioning profile shows up as "Valid profile" in my Library, but under the Provisioning Profiles listed for the device there are none listed. I have tried clicking the Add button and importing it manually - nothing happens. It doesn't show up. When I click on the device icon in Organizer is says "Provisioning No provisioning profiles". However when I go to my iOS Provisioning Portal online and click on the device, the provisioning profile shows up there as being associated to the device.
Any ideas? I am pulling my hair out here.
Do you by chance have two developer accounts with different sets of devices/apps? I encountered this situation (see what "iOS Team Provisioning" profile is matching "iPhone Developer"). The only way I have found to switches teams, so to speak, is to select your device and click "Add to Portal" and log in with the correct Apple ID.
The solution that worked for me was:
-Deleted all references to provisioning profile in .pbxproj.
-Deleted all certificates in keychain.
-Imported my certificate to keychain.
-Created new provisioning profile and configured it in developer portal.
-Refreshed provisioning profiles in xcode organizer.
-Deleted the wildcard provisioning profile that xcode automatically adds.
-Went into code signing and selected the signing account associated to the correct provisioning profile.
-Plugged in a different iOS device (switched iPad with for fresh iPhone)
-Built for a new iOS device.
And it worked. Not sure which step was the magic one. I did not reinstall xcode.
Make sure there is a valid private and public key generated for the profile. More importantly make sure the keys are stored in the right place in keychain.
They should be under login, not system or any other spot. This was causing and issue for me, and it took me a while to find the solution.
Hope this helps.
I have seen this problem before, and my "standard" solution is
a) make a new dummy iOS project , using Xcode menu - file - new - project. Check code signing is your developer certificate. Compile and see if it can run on your iPhone/ipad hardware.
If a) fails, it is something with your certificates and keychain. Clear all and make new certificates
If b) works, it is something in the .xcodeproj file or build folder for your problem project. Remove all files and folders in build. Use your backup (sure you have a daily backup for your project!!!), and copy an "old" .xcodeproj file to your problem project. Use Xcode - project - clean, xcode - project - build as - testing , and hereafter "run".
Before trying above solution, make an extra backup.
good luck, and remember you are not the first having certificate problems.
In my case the problem was not at all related to keys, certificates, provisioning profiles or any other of the reasons mentioned here and everywhere else. It turns out that some other developer in a different team borrowed the iPad we use and changed the device's date to one year in the future! After I set the correct Date and Time and ran the application on the device everything worked just fine.
Unfortunately Xcode didn't warn me about this, and it was until I needed to fix another unrelated problem that Instruments informed me of this situation about the wrong date on the device.
Simply check "Code Signing" section in "Build Settings". If you previosly build your app for appstore publication maybe you forgot change from distribution profile to development profile.
If you are on Xcode 6, and running into this problem when adding a new device (iPhone 5/6), you can follow the steps here:
https://stackoverflow.com/questions/22993092/a-valid-provisioning-profile-for-this-executable-was-not-found-error-when-tryi/26153171#26153171

error during app installation on device

When I am installing my app on device this error is coming..
I am searching on net since yesterday found many tips and also applied but it fruitless.
Please guide me what to do ?
Give the valid code sign identity of your corresponding device in your xcode project(i.e) valid provisioning profile.
Verify the following things,
1.Login to your developer account, and in the provisioning portal confirm that the corresponding device is added.
2.Have you install the provisional file into your device?
3.Check your build settings that you have choose the correct code sign identity.

Code sign error with Xcode 3.2

I had a fully working build environment before upgrading to iPhone OS 3.1 and Xcode 3.2. Now when I try to do a build, I get the following:
Code Sign error: Provisioning profile 'FooApp test' specifies the Application Identifier 'no.fooapp.iphoneapp' which doesn't match the current setting 'TGECMYZ3VK.no.fooapp.iphoneapp'
The problem is that Xcode somehow manages to think that the "FooApp Test" provisioning profile specifies the Application Identifier "no.fooapp.iphoneapp", but this is not the case.
In the Organizer (and in the iPhone developer portal website) the app identifier is correctly seen as 'TGECMYZ3VK.no.fooapp.iphoneapp'.
Also, when setting the provisioning profile in the build options at the project level, Xcode correctly identifies the app identifier, but when I go to the target, I'm unable to select any valid provisioning profile.
What could be causing this problem?
Update: I've tried to create a new provisioning profile, but still no luck. I also tried simply changing the app identified in Info.plist to just "no.fooapp.iphoneapp". The build succeeds, but now I get an error from the Organizer:
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).
This seems reasonable, as the provisioning profile still has the "TGECMYZ3VK.no.fooapp.iphoneapp" application identifier.
I also double checked that all certiicates are valid in the Keychain.
So my question is how I can get Xcode to see the correct application identifier?
UPDATE: As noted below, what seems to fix the problem is deleting all provisioning profiles, certificates, etc., making new certificates / profiles and installing them again. If anyone has any other solutions, they would be welcome. :)
I had to manually remove the provisioning profiles from my phone, then rebuild the apps after doing a "clean all targets" from the build menu.
That's under Settings -> General -> Profiles
This happened to me when I got a new Mac. You'll fix it, don't worry
Well, as seems to be the case with a lot of these code signing issues, deleting all provisioning profiles, certificates, etc. and revoking and generating everything all over again turned out to do the trick. I even created a new bundle identifier, app identifier, etc., and now AdHoc distribution is working again.
I had this same error yesterday. I tried all of the various resetting procedures in the other answers with no luck. Eventually I also
rebooted my mac
rebooted my iPhone
deleted all of my iphone provisioning profiles from the phone using XCode
deleted all profiles from my mac (~/Library/MobileDevice/Provisioning Profiles for me)
what else? deleted build folder, restarted XCode, installed update to 3.1.2 sdk, sacrificed a chicken.
Lo and behold, it now works, the error is gone. This is serious voodoo territory.
Also, make sure that you added a reference to the Entitlement filename "dist.plist" in your project configuration CODE_SIGN_ENTITLEMENTS.
Check both Code Signing Entitlements in info for both the Build Target and the Main Application - if Code Signing Entitlements says on either then remove it
In XCode, in the "Groups & Files" pane, expand "Targets" and double-click on your app's target.
This will bring up the Info pane for your target. In the "Build" section, check the "code signing" section for any old profiles. This has happened to me many times particularly after an upgrade to a new version of the sdk and iphone os
Quick Hack if you are on Xcode 4.3.
In Xcode under Project Settings > MyTarget > Summary tab all the way in the bottom there is a checkbox that says "Enable entitlements". When I unchecked it, it made the error go away.
Inside Resources/Entitlements.plist there is a Boolean "get-task-allow" if that is not checked, check it ON. This fixed the issue for me.
After being stumped by this for quite a while I revisited the settings and discovered that I had reversed the 'Code Signing Identity' and the 'Any iPhone OS Device' entries. - The clue I had as to this happening was shown by.
Deleting every profile off the phone
Build and Go
At this point xcode attempts to provision the phone (device)
Examine the phone to see which provisioning profile has been added.
As I prefix all my profiles 'AdHoc' or 'Development' or 'AppStore' I saw immediately that the install process was putting a development profile on the device and not an AdHoc profile.
The device may not be in the list. Try modify your provisioning profile.
Just to add a note here: I encountered the same error (0xE8008016) after replacing my Macbook's logic board (although I imagine you'd have the same problem on a completely new mac), and after hours of going around in circles I realised that the iPhone Developer Program Portal had separate certificates for Development and Distribution.
A change in hardware means you need to reissue both certificates - I'd reissued Developer but not Distribution. Because my name hadn't changed when my hardware did (and certificates are identified by the owner's name), this made it a tricky problem to spot ;) Hope this saves someone else my frustration.
For reference, I ran into the same issue and deleting all of my profiles, existing certs and everything from my local drive and from the developer portal, and deleting my existing devices and re-adding them (developer portal) seemed to do the trick.
The problem is in the "project.pbxproj" file located inside the [your project].xcodeproject file. If you feel brave right click on the .xcodeproject and view contents then open "project.pbxproj" with a plan text editor. Inside search for the offensive path and correct it. In my case I just removed the entire path and just left "Entitlements.plist" and it cleard my issues up. I STRONGLY reccomend backing up your .xcodeproject before attempting this.
Double click the target then select the "Properties" tab. There change the com.yourcompany.${...}.
Another cause is if the device you want to install onto is not an approved device in the Distribution Certificate.
Sometimes Xcode does not automatically copy your provisioning profile to the right location.
In my case, that was true.
Check that your provisioning profile is in ~/Library/MobileDevice/Provisioning Profiles directory and if not just drag and drop, clean and build

/usr/bin/codesign failed with exit code 1

I am attempting to deploy my first development iPhone app, and am running into some problems. I have successfully went though the online Provisioning Assistant, but now I am stuck. No matter what I do, I always get the following error.
/usr/bin/codesign failed with exit code 1
Anyone have any ideas why this is happening?
Update:
The Technical Note in my original answer is now deprecated. 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.
I just came across this error, and here's what I found out in case this helps anyone: I discovered that you can right click the error message in Xcode and choose expand to get more details, including a description of the problem.
In my case, I had two copies of my developer certificate with the same name in different keychain files, and Xcode couldn't figure out which one to use.
It might be strange answer for codesign issue in Xcode 9.0. I was receiving this error too and did not know what to be done, because everything was correct.
I went to the keychain, I had the login option "unlocked". I locked it and compiled my build again. Xcode itself asked me to open access keychain. I gave access and it worked.
Steps were:
Go to keychain
Lock it
Archive the code, build the project again
I had the exact same error, and tried everything under the sun, including what was elsewhere on this page, with no success. What the problem was for me was that in Keychain Access, the actual Apple WWDR certificate was marked as "Always Trust". It needed 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.
There could be a lot of reason when you get this kind of error:
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 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.
I had the same problem the distribution build. It just happened all of sudden. In fact I did not have this problem a few days ago and I had my Ad-Hoc version compile right. This issue came up because my certificate just expired today. So I went create a new provisional following Apple's guidance: (http://developer.apple.com/ios/manage/distribution/index.action).
After spending hours on the net and made sure I had not fallen for what could go wrong. Here is what save me as suggested by Tobias and Dan Ray:
"...discovered that you can right click the error message in Xcode to view details".
"...the issue was an expired certificate on my System keychain. Keychain Access doesn't, by default, show expired certs".
The detailed information told me about ambiguous matching two certificates. One of them happened to be an expired certificate in the System key chain. So I deleted the expired one then it worked! I also had a concern about what to enter in the "common name" when create the distribution certificate using the keychain utility: my name or my company name. In my case, I entered my name. I am guessing it is the same as the title that addressed by the developer's auto responder email.
Great help. Thanks.
If the error immediately preceding the codesign error says something like 'resource fork, Finder information, or similar detritus not allowed'
Then navigate to the .app file in Terminal and type:
xattr -cr < path_to_app_bundle >
ref: https://developer.apple.com/library/content/qa/qa1940/_index.html
What worked for me was 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"
Unfortunate that this ambiguous error condition has 400 different solutions, but I digress.
I had the same problem. In the end it turned out that my private key did not allow codesign to access it. One can see this in the info dialog in keychain application.
I have to agree with Tobias. The error is too generic. When the same thing happened to me I dug into the error message and realized I'd screwed up something in the build properties, but not the code signing. So yeah, I'd dig in to the details.
In my case error was due to the fact that I had two keys on the keychain with the same name. I deleted the old one and that solved the issue.
Going to the detail message show the real problem to me.
after hours of googling and trying out different things, this is what fixed it for me:
Make sure there are no certificates in the System > Certificates tab on Keychain Access. Remove all duplicate certificates from there.
Install the WWDR intermediate certificate under certificates from the provisioning portal, in addition to the developers certificates and make sure you see it in the Login > Certificates tab on Keychain Access.
hope this helps some of you!
Same issue with ambiguous (matches "iPhone Developer: [me] " and /// tweetdeck's library privatedata file. Fixed it by moving file to the trash and re-logging into Tweetdeck, setting up passwords again. What a pain.
I had the same problem but also listed in the error log was this: CSSMERR_TP_CERT_NOT_VALID_YET
Looking at the certificate in KeyChain showed a similar message. The problem was due to my Mac's system clock being set incorrectly. As soon as I set the correct region/time, the certificate was marked as valid and I could build and run my app on the iPhone
I was also getting this error ("/usr/bin/codesign failed with exit code 1"), and when I looked in Keychain Access my developer certificates were marked as "This certificate was signed by an unknown authority". I had recently upgraded to Mac OS 10.8 and have had a couple of other XCode (4.5.2) issues since then. It turns out I did not have the WWDR intermediate certificate installed. I downloaded that from the iOS Provisioning Portal, installed that in Keychain Access, and my project builds again!
When I got this error I wasn't even trying to sign the app. I was writing a test app and didn't care about signing.
In order to get rid of this message I had to select "Don't Code Sign" from Build Settings under Code Signing.
Sometimes your build folder simply needs cleaning - it certainly worked for me. Thanks to loafer-project for the solution.
One possible cause is that you doesn't have permission to write on the build directory.
Solution: Delete all build directory on your project folder and rebuild your application.
I just came across this error and it was because I was trying to write the build file to a network drive that was not working. Tried again from my desktop and it worked just fine. (You may have to "Clean" the build after you move it. Just choose "Clean all Targets" from the "Build" drop-down menu).
Tobias is correct though, dig into the details on the code by right-clicking it to see what your specific problem is.
One thing that you'll want to watch out for (it's a stupid mistake on my part, but it happens), is that the email address attached to the CSR needs to be the same as the email connected to your Apple Dev account. Once I used a new CSR and rebuilt all the certs and provisioning profiles, all was well in applesville.
Another reason,
Check your Developer account is connected with xCode
Kinda old question, but still happens it seems. Another solution:
Occurred for me after reverting a branch in git.
Tried cleaning, cleaning builds, deleting derived and restarting Xcode, but no luck.
Try rebooting the comp.
I had the same unknown error from codesigning that you mentioned. Similar to the answer provided (but a little different), I just locked my keychain access and unlocked it, and I was able to build and run to my device again. If anyone has the same issue, perhaps try that first before going through the trouble of modifying the keychain password.
Throwing my comments into the ring, I just came across this after attempting to refresh my development environment after clicking DENY accidentally on one of the application requests, after searching around I found a number of things that didn't seem to work. This is the full order in which I've attempted the fixes and whether there was a success:
1) Attempted to clear the DerivedFiles and restart XCode - no dice
2) Attempted to Log and Unlock the Keychain, then restart XCode - no dice
3) Attempted to refresh my developer account within XCode - no dice
4) Bit the bullet and just reset my entire keychain, after doing so my developer account was signed out (signed back in), then restarted XCode - no dice
5) Found an article on here that said that we needed to set the [login|local|System]/certificate/Apple Worldwide Developer Relations Certificate Authority to "System default". But in my case it was already set to system default - no dice
6) Then I looked at my actual developer certificate login/my certificates/Mac Developer: and when I looked in there it was correctly set to Confirm before allowing access BUT there was no entries in the lower section. There should be [Xcode, codesign, productbuild]. I deleted the certificate entry and restarted XCode - bingo
The certificate was added and I was then prompted. So what did I do, I pressed "always allow" and then just boned myself.
I had to go back and delete the certificate again, then go through about 20 allow dialogs during a clean build. Once completed, I was able to build completely.
In My Case, after a fews days of research,
All I did to revolve is listed below:
delete all the certificate on your keychain.
goto your apple account. a) download the specify certificate your want to install on your keychain. b)(Optional) Also create and download the require profile.
in Xcode, clean your project. This may take some time.
Build your project.
This should work for similar codesign issues.
Note, during this process the OS would ask for your credential validation.
I use Xamarin and for me this is what worked after trying everything else.
In Visual Studio for Mac I've opened a .xib file so it opens the project in Xcode.
Went to the project settings > Signing and Capabilities, selected the team and then fixed the Signing Certificate.
I think the issue is with the Keychain Access and certificate trust.
Try adding the following certificate Apple Worldwide Developer Relations Certification Authority from https://www.apple.com/certificateauthority/ (Expiry validity 2030)
The trust warning indicated in certificate will be fixed and then try building the iOS application again
Open the project path in terminal and enter the below commands in terminal
1) find . | xargs -0 xattr -c
2) xattr -rc .
This works for me.