-
4 Mar 2013 6:59 AM #11
Ok. I'm getting closer. Basically I had to do this to see the "registering device". Remove this from ST index.html
And instead put PushNotification.js in the js array of app.jsonCode:<script type="text/javascript" charset="utf-8" src="resources/js/PushNotification.js"></script>
Then I copied all the Plugins from https://github.com/shaders/push-noti...p-Push/Plugins to Xcode plugins folder (and added them to the Xcode project) - the documentation does not clearly say you need to do this!
Now when I run that on my real iPhone (FYI I also discovered PushNotifications don't work in the iOS Simulator), then console log in Xcode says:
Code:2013-03-05 00:52:19.464 MyApp[1075:907] [WARN] failed to register : {"error":"Error Domain=NSCocoaErrorDomain Code=3000 \"no valid 'aps-environment' entitlement string found for application\" UserInfo=0x1f5a2f50 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}"}
Any ideas how to get past this one?What comes around goes around
-
4 Mar 2013 7:35 AM #12
Have you whitelisted pushwoosh.com and apple.com? You have also to upload your certificate to the PushWoosh account
-
4 Mar 2013 7:45 AM #13
Well I fixed that last issue, by getting my provision filename correct. I created the xcode project with all lowercase myapp, and for some reason created the provision with MyApp.
And now it works fine, i.e. I can push message to my real iPhone from pushwoosh.
I think the key thing from this is that people need to know that PushNotifications.js needs to be in the app.js js array, and you need to add all the Plugins (found at https://github.com/shaders/push-noti...lob/master/SDK Sample Projects/iPhone-Phonegap/Phonegap-Push/Plugins/HtmlWebViewController.m) to the Xcode project.
Cheers for the help guys!What comes around goes around
-
4 Mar 2013 7:49 AM #14
update: I see you've fixed the issue yourself, great to hear that, welcome aboard!
Your mobile provisioning profile must contain the “aps-environment” string with the proper value. If it is not there, you should recreate the mobile provisioning profile in the Apple Development Portal. Make sure the “aps-environment” value matches the gateway you are using: Sandbox for “development” and Production for “production” values.
Please feel free to contact our support via web form on any questions regarding Pushwoosh, we will do our best to help you out!
Last edited by pushwoosh; 4 Mar 2013 at 7:55 AM. Reason: update


Reply With Quote