Search code examples
objective-cxcodeapple-push-notificationsprovisioning-profile

Xcode crashes when refreshing provisioning profiles


Last week I posted a question here where I explained why my Xcode is crashing when I press the refresh button. This question however got closed for being off topic but I dont really get why. (Stackoverflow should provide more information on this subject)

But I still got this problem and I cant get my app running with push notification because I think I'm using old provisioning profiles and I CANT refresh them without Xcode crashing!

I've created multiple apps with push notifications so I know the procedure but keep getting the error:

did Fail To Register For Remote Notifications With Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x2340a0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}

Does anybody know why my Xcode is crashing and how I can fix this? Thanks.

And please post a comment if you're thinking of closing this question so I know why this question is closed.


Solution

  • Ravi is right. Here's Apple's official workaround:

    Run /Applications/Utilities/Terminal.app and execute the following statement:

    mkdir ~/Library/Developer/Xcode/OldPortalDBs; mv ~/Library/Developer/Xcode/connect1.apple.com* ~/Library/Developer/Xcode/OldPortalDBs

    See: Xcode 4.6.1 crashing while interacting with the developer portal