I didn't realize this until after I submitted my app to the App Store (and its now available) that there was a difference between a distribution and production token. During development, push notification worked for me, but after downloading it from the App Store, it didn't work.
I have push notifications enabled for development and distribution. I have created the appropriate development and distribution provisioning profile with push notifications enabled.
Some questions that I have is:
Is there anything I can do in my .php file, now that the app is in the app store, to allow push notification without submitting another update, i.e. changing the APNS server location from development to production?
Do I have to change how I fetch token within AppDelegate.m? Right now I have this within didRegisterForRemoteNotificationsWithDeviceToken
:
NSString *token = [ [deviceToken description] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"<>"] ];
// Remove spaces from the token
token = [token stringByReplacingOccurrencesOfString:@" " withString:@""];
How can I test the production mode in Xcode? I have already created an Ad-Hoc certificate.
Thanks