178

I have an application that I am debugging on iPad. 2 days ago I wanted to debug a same updated application but I am having this error.

The identity used to sign the executable is no longer valid.

Please verify that your device’s clock is properly set, and that your signing certificate is not expired.

(0xE8008018).

I don't have iPhone Developer certificate yet, but I have debugged this game once.

Dan Beaulieu
  • 19,406
  • 19
  • 101
  • 135
Hayk Melkonyan
  • 2,110
  • 4
  • 16
  • 22

40 Answers40

235

Neither restarting Xcode nor restarting my Mac helped.

Solution within Xcode:

  1. In Xcode, go to Preferences --> Accounts --> View Details
  2. Press the + symbol and select iOS Development
  3. Press the refresh button in the lower left corner (called Download all in Xcode 7)

PS:

  • Sometimes it may also help to delete invalid provisioning profiles: right-click -> move to trash
  • I saw this error exactly one year after signing up as an Apple developer.
John
  • 8,468
  • 5
  • 36
  • 61
  • 14
    Thanks! This worked for me, except I didn't need step 2. – sup Feb 16 '15 at 18:59
  • 3
    Thanks! Probably this problem happens once per year after the date of enrolment. – Sergey Neskoromny Apr 08 '15 at 09:01
  • 3
    Thanks! I reactivated my enrolment and faced this issue. This one helped me out. – Thanh-Nhon Nguyen May 18 '15 at 21:16
  • 1
    Correct answer nowadays – Fede Cugliandolo Jun 15 '15 at 17:45
  • 1
    For me it only helped that I deleted all downloaded provisioning files and then let Xcode "Fix issues". – Lars Blumberg Oct 20 '15 at 08:06
  • I develop on a Mac desktop and on a MacBook Air. Desktop is up to date, Air seems to be out of date and displays the "identity no longer valid" message when building. I finally did what Lars Blumberg did: XCode->Settings->Accounts, highlight my Apple ID and delete (minus sign at bottom). Then re-add it ("+" sign) enter id and password, and let it load certificates from server. It will offer to "fix issues". Let it. Then all is well. – Blisterpeanuts Apr 22 '16 at 21:14
101

Try restarting XCode. It worked for me.

Namratha
  • 16,630
  • 27
  • 90
  • 125
  • 1
    It works for me as well. command + Q to exit XCode and restart. Cheers! – Joey Aug 30 '13 at 04:38
  • 9
    i had to delete all certificates/profiles manually and also refresh everything on the Apple developer portal and download them again, but it worked. – benka Oct 30 '13 at 15:36
  • Confirmed with Xcode 5.1.1. Happened after (re-)using an old device for development. – Sea Coast of Tibet Aug 23 '14 at 22:16
  • Just happened to me with latest'n'greatest Xcode 6.1. Sure enough restarting fixed it. – Reuben Scratton Nov 15 '14 at 19:06
  • 9
    Just happened to me with the latest 6.1. Restarting XCode, and deleting the Project "derived data" made no difference. I loathe this nasty little outdated development environment soooo much. – Mike Gledhill Dec 18 '14 at 10:44
  • 83
    Restarting Xcode didn't work for me. What fixed it for me was going to Accounts in Xcode (in preferences), Details for my developer account then clicking the refresh icon at lower left. That loaded a new team provisioning profile, which apparently was needed... yeah. We shouldn't have to deal with this Apple. Microsoft used to do this stuff to developers, don't go there. – Eskim0 Mar 09 '15 at 03:34
  • 2
    @Eskim0 Your fix worked for me after I'd run into the same issue after converting from a personal to business account. – Rogare Apr 02 '15 at 15:55
  • I've just had this problem. I think it was related to me changing my account password. Eskim0's answer worked for me (thanks for that!) after I removed my account and re-added it with the correct password – aronspring May 08 '15 at 09:31
  • 1
    Follow Eskim0 and make sure the restart Xcode as well afterward. Come on Apple, this is 2015 not 1980!!! – user523234 Jun 07 '15 at 13:59
  • 1
    I had 2 developer certificates and one had expired, so Xcode wanted to use that one. FIX: open Keychain Access -> Certificates, remove the expired certificate. (install a new one if you no longer have a valid developer/distribution certificate). THEN restart Xcode. – Levi Aug 19 '15 at 19:36
  • FYI refreshing the developer account profiles like Eskim0 mentioned fixed this problem for me in XCode 6.4, but it did not fix it when clicked from XCode 7. – spfursich Sep 04 '15 at 18:22
  • 1
    try "Download all" in Xcode Accounts to refresh the provisioning profiles, this works for me – gogoqaz Oct 29 '15 at 05:02
  • Didn't work for me either. I had to generate and download profiles again to make it work. – Pablo A. Nov 12 '15 at 13:12
  • Choosing team helped me – Thejaswi Venigalla Mar 16 '16 at 07:41
59

This may happen when your certificate expire in your Key Chain.

EDIT : I'd now recommand cert and sigh to generate your certificates and provisionning profiles. These are two commands part of the fastlane tools from KrauseFx.

Using cert & sigh:

  1. Open a terminal and type cert
  2. Answer the prompted questions to sect your user, password, team, app, etc.
  3. Open a terminal and type sigh
  4. Answer the prompted questions to sect your user, password, team, app, etc.
  5. Select the right profile in Code Signing Identity (iPhone Developer)

Conventional way:

  1. Just go to the new provisioning portal : Certificates, Identifier, Profiles
  2. Login with your developer account.
  3. Go to Certificates and click the Plus button.
  4. Then select iOS Apps Development and click Continue.
  5. Follow the whole process and download the newly generated certificate.
  6. Download it and put it in your keychain.
  7. Update your profiles from XCode Organizer devices window
  8. Select the right profile in Code Signing Identity (iPhone Developer)
Dulgan
  • 6,674
  • 3
  • 41
  • 46
  • 1
    i followed the above process it will ask for Revoke and Request. If i Revoke that certificate is any effect on distubution?? – S P Balu Kommuri Jan 08 '15 at 07:55
  • 1
    It won't affect any apps that already are on AppStore, but you'll have to regenerate every provisioning profiles using your new certificate for future usage (i.e. compilation) – Dulgan Jan 08 '15 at 09:11
  • That means if i use for future developement of my application. I want to use newly created provisioning profile is it correct. @dulgan – S P Balu Kommuri Jan 08 '15 at 12:13
  • Yes, everything you already developed will still work, but every provisioning profiles created with your old certificates will expire. Provisioning profiles are used only when you install app through XCode, over the air OR when you send app to iTunesConnect – Dulgan Jan 08 '15 at 12:24
  • Thank you @dulgan from now onwards i use new revoked certificate with new provisioning profile it will be no issue na. ok..... – S P Balu Kommuri Jan 08 '15 at 12:42
  • @Carrl Your issue may not be related to the same problem. You could try other answers on this page. – Dulgan Oct 19 '15 at 07:51
22

If all the above previous suggestions fail after renewing your certificate, as they did for me, browse to the following location;

~/Library/MobileDevice/Provisioning Profiles

...and delete your provisioning profiles.

Then download your provisioning profile again from;

https://developer.apple.com/account/ios/profile/profileList.action

AnthonyBlake
  • 2,334
  • 1
  • 25
  • 39
6

If you are using jailcoder, make sure you jailbreak your iphone successfully. Don't forget install AppSync for IOS in Cydia.

Andrew
  • 1,088
  • 10
  • 21
5

In the latest update from xcode this problem usually occurs when your certificate has expired and xcode continues to use the old one until it has expired.

Closing xcode and opening it again will fire off an automatic process of downloading your new certificate and getting your app working.

Just close xcode right down (Cmd + Q) then open it back up again, load your project and hit play .. it will ask you if you'd like assistance to auto fix the certificate problem then you just follow the onscreen instructions and it does all the hard work for you :)

Kevin S
  • 1,067
  • 1
  • 10
  • 19
5

You have your provisioning profiles outdated.

  1. xcode
  2. Preferences
  3. Accounts
  4. Select your apple id
  5. View Details (Right-bottom corner)
  6. Download All
  7. Run again and DONE!
Sebastián Lara
  • 5,355
  • 2
  • 28
  • 21
4

This may be somewhat of an empirical approach but is worthwhile in the face of many commentators noting either "this worked for me" or "this didn't work for me". Firstly, the problem can lie in a number of locations, either your certificates (code signing identities) or your provisioning profiles. Identifying where the problem lies first before doing anything will save a lot of wasted effort. You will need to check in three places:

  1. XCode
  2. Keychain Access
  3. The Developer Portal (Developer Members Centre)

OK, in XCode click on the Project (Above the Targets Heading), select Build Settings and scroll to 'Code Signing'. Expand the 'CODE_SIGNING_IDENTITY' heading and you will see a bunch of identities (Debug, Release etc.) Each one of these will match up with a certificate in Keychain Access. Find the match and check the expiry date...if it has expired you will need to update it in the Developer Portal and download it. Check EVERY identity, not just the first one you find that has expired. Also, if it has expired you will need to regenerate any provisioning profile that used the expired certificate. If no problems with the certificates, check the expiry date of all the Provisioning Profiles. Once again, if they have expired, they will need to be regenerated.

Once complete, repeat the same process for the TARGET you are trying to build for.

None of this worked? An expired certificate is lurking in one of your provisioning profiles. A sign that this might be the case is that when you click on a CODE_SIGNING_IDENTITY the identity is below Other... eg.xcode example of dodgy identity

This is usually a sure sign that there is an expired certificate lurking about and that one of your profiles is using it.

arcady bob
  • 1,536
  • 1
  • 10
  • 5
3

I faced to this problem when my membership was expired and I renewed it. I use xCode6 and I solve this problem by revoking expired developer certificate from Member Center and cleaning build folder ( alt+[Product>Clean] ). xCode handle others issue itself.

See "Replacing Expired Certificates" section on this link: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

CoyBit
  • 1,592
  • 1
  • 17
  • 19
3

I had this problem with XCode 6.3 Below is the steps that worked for me.

Go to XCode > Preferences > Accounts Select your developer account then click View Details... Click on the refresh button on the left bottom of the window. It should notify you that you're missing few certificates. Click Request. XCode automatically should download missing certificates. Click Done and it should work.

u54r
  • 1,767
  • 2
  • 15
  • 26
2

I faced the same issue, I deleted all provisioning assets from xcode & added them back, and just relaunched Xcode.

My App was loaded on to the device and it worked.

JoseK
  • 31,141
  • 14
  • 104
  • 131
2

This does also happen if your developer certificate is expired. Time to pay apple and renew it :P

Raj Pawan Gumdal
  • 7,390
  • 10
  • 60
  • 92
2

First: go to build settings and check, if your valid Code Signing Identity is chosen. If that doesn't help, try the more complicated stuff

brainray
  • 12,512
  • 11
  • 67
  • 116
2

In my case, this dialog message worked

The identity used to sign the executable is no longer valid.

Please verify that your device’s clock is properly set, and that your signing certificate is not expired.

(0xE8008018).

My certificate in Keychain Access was given status to be not valid yet in red color with expiry about one year and an hour in future. I set my time to be one hour ahead and status of the certificate became valid in green color. So, anyone out here who thinks the solution to be the xcode restart is not correct but it would be cause of time elapsed of the xcode restart to make the certificate valid. As, by clicking the Fix Issue button revokes and creates new certificate with exactly one year ahead (plus some minutes depending upon locales to raise this issue).

zeeawan
  • 6,667
  • 2
  • 50
  • 56
2

My solution, after nothing else worked, was to go to Keychain Access and delete all "iOS developer" keys/certificates, then let Xcode regenerate them.

maniek
  • 7,087
  • 2
  • 20
  • 43
2

you debug it on simulator only if you don't have iPhone Developer certificate. check on left corner in xcode you select simulator not device.

priyanka
  • 2,076
  • 1
  • 16
  • 20
1

Try setting the time on the mobile device and the Mac to "set date and time automatically" checkbox and restart xcode, that did it for me

Waqleh
  • 9,741
  • 8
  • 65
  • 103
1

The Problem here is that your profile was built on an expired certificated

-so you have to go inside the developer portal and renew your certificate if it was expired

-then regenerate the profile so it will be rebulit on the new certificate

i suggest to use the iPhone configuration utility tool to manage profiles on your mac

Omar Freewan
  • 2,678
  • 4
  • 25
  • 49
1

If your certificate is not installed locally. Or you tried running the certificate and opted to "revoke and request" a new certificate then you have the option to do that on the machine you are trying to run on

go to Preferences-> Accounts-> under your AppleId -> View Details -> under signing identities you can see the status of your certificate "Valid" or "Revoked" if revoked and you want to request a new one go to the -> + then -> the type of distribution you are trying to use.

Daisy R.
  • 633
  • 1
  • 7
  • 19
0

In Xcode 5.1 - there is a self help area that did the job for me.

You'll find it in the General section after clicking on your project name under > Targets. You should see a warning icon and a description of the issue in the Identity section (right where you type in your build/version numbers).

It noticed that there was no certificate currently stored and via some self-help boxes and a change of my password, I got it going.

Chris Lambrou
  • 356
  • 2
  • 7
0

These were the reasons I had this error:

The App ID didn't have my iOS Developer Certificate checked (I'm a member of an Enterprise program) and I had 2 provisioning profiles with the same App ID in my Mac. I deleted one.

Hopefully this helps someone.

user3900346
  • 199
  • 1
  • 4
0

I had this problem several times, normally it can be solved by close-reopen Xcode.

I did delete derived data from Xcode organizer. It eventually works

r0n9
  • 2,505
  • 1
  • 29
  • 43
0

I tried all of the above. I kept getting the error about the UUID not being found.

I went to the project, opened project.pbxproj and found all instances of the UUID (2) and deleted the UUID (not the entire line).

Fixed the problem.

Dorrin
  • 96
  • 1
  • 5
0

I fixed this issue by selecting the correct team within Xcode (I'm part of multiple teams). Also, I revoked my certificate, requested a new one, uploaded that, and then re-downloaded it.

Viper
  • 1,327
  • 2
  • 12
  • 33
0

Experienced the same issue. Was an issue with an expired certificate. You'll need to create a new cert and corresponding prov profile. Follow dulgan's advice for doing so.

Community
  • 1
  • 1
Joshua Book
  • 157
  • 1
  • 9
0

Removed the profiles from the directory on your machine: "~/Library/MobileDevice/Provisioning Profiles". And logged to apple developer centre and edited the specific provisioning profile and selected the certificate for provisioning profile and generated the profile again. Installed the new profile and it worked for me.

QCG
  • 2,569
  • 3
  • 20
  • 25
0

Found another way this occurs today. When you edit your provisioning profile after a certificate change you can see the certificates selected says 2 of 1 certificates selected (if you just use 1 certificate). Just by unselecting and reselecting the certificate you can regenerate and install the profile and it solves the problem.

AdbC
  • 1
0

@vomako 's solution almost solved my problem but I had to take another couple of steps.

I refer to the following...

In Xcode 6.1.1, I went to Preferences --> Accounts --> View Details

After upgrading to Xcode 6.1.1, the main issue for me that the >View Details button was greyed out.

I had to delete my account, restart Xcode, then add my developer account back in.

After this step, I could yet again view details and refresh my provisioning profiles.

andrewbuilder
  • 3,629
  • 2
  • 24
  • 46
0

I selected None from Team dropdown in target general settings. Then selected the original team. Xcode shows some spinner next to it. Wait for it to complete and then everything works. Tried it in Xcode 6.2

Jeet
  • 1,030
  • 2
  • 10
  • 20
0

Today I faced this issue on my Xcode 6.3 public release.

I tried to restart Xcode several times but issue remained there.

What worked for me is

Manually create a new development profile at "http://developer.apple.com" 
download and install this new profile, select this new profile from xcode build and run.
Irfan DANISH
  • 8,349
  • 12
  • 42
  • 67
0

Same happened to me, In my case I just needed to approve apple's ne terms of service over: https://developer.apple.com/membercenter

DanielZiv
  • 107
  • 8
0

I took a bit of a hiatus from iOS to work on an Angular project and had this surprise waiting for me when I came back :-) In my case, I think it had to do with the fact that Apple is merging its developer programs, (at least from what I understand they are merging their developer programs), and I had to accept their new agreements.

Anyways, to fix this I combined a lot of the answers you'll find here and scattered throughout the web.

First, make sure to accept any pending agreements through both iTunes Connect and Apple's developer center. Make sure to accept any agreements in the "Agreements, Tax and Banking" section in iTunes Connect.

Second, via Xcode, go to Preferences -> Accounts -> View Details and at the bottom left there should be an option to refresh your profiles. When I did this Xcode installed a few new profiles.

Finally, restart Xcode.

Give some time in between each step for Apple's servers to update if these steps don't work right away.

Michael E
  • 656
  • 2
  • 7
  • 13
0

I solve this problem using the new provision profile from apple developer account, Clean Derive-Data, And Refresh Developer Account in XCode.

Thanks your support. :)

Ilesh P
  • 3,940
  • 1
  • 24
  • 49
0

I came through this error. The problem was The developer identity and Mobile Provisioning Profile mismatch.

Delete keychain certificates and fresh install matching provisioning profile and developer certificate fixed the problem.

Alvin George
  • 14,148
  • 92
  • 64
0

I have tried many method to solve this problem.But they did not work. Including

  • restart my Xcode or my Mac.
  • delete invalid profiles and generate again.
  • reset Xcode > Preferences > Accounts.
  • update iOS version and Xcode version.

    What finally worked for me is:

register a new apple developer account and add to Xcode

I think maybe my developer account has some problem.

0

I've resolved editing my provisioning. In fact, i've noticed that this mobile provisioning was not associated with my signing identity.

So, from the developer apple i followed this step: Select Provisioning Profiles -> Edit -> check my identity from "Certificates".

Effectively it's a strange error...

Alessio Campanelli
  • 970
  • 11
  • 19
0

I had this problem and tried everything here but it didn't help. Then I noticed that the cord I was using was a little frayed, so I tried a new cord and it worked.

Tom Kincaid
  • 4,887
  • 6
  • 47
  • 72
0

I have one strange problem. In fact when i plug my phone to my mac the time of the device change but not use the actual hour. For example on my computer I have this hour : 05:17 pm but on my phone when is unlocked time is frozen to 09:41 am so when i try to build my app on phone from xCode i have the next error message :

Please verify that your device’s clock is properly set

The strange thing is that when my phone is still pluged to the mac the time on lockScreen is good (05:17 pm)... And if i check on Date & Time on general settings I have this strange thing too (time of statusbar is wrong but time below is good) :

Wrong time on statusBar

After few minutes i understood that it was because of QuickTime Player which was running on my mac with view of my iPhone (i was going to save a video demo of my app).

To resolve the problem I had to quit all applications and restart computer.

In plus at the end if problem persists do these steps :

  • xcode: Preferences > Accounts
  • Select your apple account
  • Remove it
  • Add your Apple account (+)
  • Run your app again.

Hope this can help.

Thank you,

O. Boujaouane
  • 285
  • 5
  • 18
0

I have solved the same problem. Just from "https://developer.apple.com/account/ios/profile/production/create" re-created the new Provisioning Profiles. Then download and install the new Provisioning Profiles of (Development and Distribution).

enter image description here

ylgwhyh
  • 1,588
  • 18
  • 21
0

Method no 12454: Set invalid (or any other) provisioning profile -> compile (you get error). Then set the correct provisioning profile. Might as well work ( did for me )...

Pawel Klapuch
  • 380
  • 4
  • 15