15

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.

Community
  • 1
  • 1
Mark Molina
  • 5,057
  • 8
  • 41
  • 69
  • 1
    what happens when you manually download and install provisoining profile ? – Guru Mar 18 '13 at 11:02
  • you mean downloading it from the portal and selecting the profile? Same result. – Mark Molina Mar 18 '13 at 11:04
  • This is obviously a bug in Xcode, and it's extremely unlikely anybody on Stack Overflow can fix it for you. That's probably why it was closed the first time. Have you reported the bug to Apple? – Jim Mar 18 '13 at 11:06
  • Btw after manually adding the profile it suddenly isnt selectable in the build setting.. I'm going to reinstall Xcode and hope this fixes my problem – Mark Molina Mar 18 '13 at 11:12
  • The error might be related to the entitlement, it says it found the string but it is not valid. Try checking your entitlement and make sure you set it up properly. Just a thought. – Adrian P Mar 18 '13 at 12:43
  • 1
    I was able to get around this my reverting back to Xcode 4.5.2 – Daniel Mar 19 '13 at 18:04
  • I'm having the same issue. How did you revert back to 4.5.2? – nonamelive Mar 21 '13 at 14:18

3 Answers3

13

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

Bobjt
  • 4,040
  • 1
  • 29
  • 29
2

It works for me if I removed this file "~/Library/Developer/Xcode/connect1.apple.com 4.6.1.db" before running XCode 4.6.1.

Ravi Chokshi
  • 1,106
  • 9
  • 18
0

After some restarts and project cleans (and manually download!) it suddenly worked with push notifications. Xcode still crashes on refreshing and bug is reported.

Mark Molina
  • 5,057
  • 8
  • 41
  • 69