1

I want to test if my first app, which is not far from shipping the app store, works in production mode, too. So I added the Production Push SSL Certificate to the appID and added a new app to Urban Airship, so that the app now uses the production servers. First, it didn't work, the app still tried to use development servers and couldn't connect to them. So I changed the Code Signing Identity to Distribution. Then it connects to the production server and I get a device token. But after 1-2 seconds the app crashes and I get the error message: error: failed to launch '/Users/"MyName"/Library/Developer/Xcode/DerivedData/"AppName"-crdfguzuswjwdkfesxsjpooswbgf/Build/Products/Debug-iphoneos/"AppName".app/"AppName"' -- failed to send the qLaunchSuccess packet

What do I have to change?

user
  • 85
  • 7
  • You might have a broken debugger. Restart Xcode or restart your phone. If all else fails, restore it from a backup. – MCKapur Jun 16 '12 at 10:07
  • i already restarted xcode and my iPhone and just tested it on the one from my father. But that didn't change anything, so the problem must be in xcode. Are there any settings that have to be done to test apps in production mode? – user Jun 16 '12 at 10:25

1 Answers1

1

You will need to create an Ad-Hoc profile for code signing to test push notifications in production mode.

Read this answer for more: https://stackoverflow.com/a/6413247/550177

Community
  • 1
  • 1
Felix
  • 35,354
  • 13
  • 96
  • 143
  • Hm, now I did that but there's still this annoying crash. I have a distribution certificate, I created a provisioning profile with ad-hoc configuration and selected ad-hoc for archive in the edit scheme window. What did I miss to do? – user Jun 16 '12 at 11:08
  • You cannot debug your application when using a distribution certificate because of the get-task-allow property. You must test it without a debugger attached. http://developer.apple.com/library/ios/#qa/qa1682/_index.html – Felix Jun 16 '12 at 11:22
  • but how do I do that? Can I set it in the Entitlements file? – user Jun 16 '12 at 13:55
  • Yes you set it in the entitlements file. But I'm not sure if it is even possible to make it work when signing with a distribution certificate. – Felix Jun 16 '12 at 14:04
  • error message:( The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. – user Jun 16 '12 at 14:05
  • Then obviously it is not possible to debug with a distribution profile, Apple advises to use a development profile instead (see QA). You can also test without a debugger and then inspect the log files afterwards in the Xcode organizer. – Felix Jun 16 '12 at 14:21
  • ok, i'll tried that next. But what do you do when you want to test if your apps work in distribution mode before uploading them to the app store? – user Jun 16 '12 at 14:29