I registered the appid in apple developer provision, with development push enabled. after that I regenerated the mobileprovison. and I use the following code the to register the push.
Ti.Network.registerForPushNotifications({
types: [
Ti.Network.NOTIFICATION_TYPE_BADGE,
Ti.Network.NOTIFICATION_TYPE_ALERT,
Ti.Network.NOTIFICATION_TYPE_SOUND
],
success: deviceTokenSuccess,
error: deviceTokenError,
callback: receivePush
});
the success callback works, I didn't meet any error. I use the acs webconsole to send push test message, the push log shows that the message had been sent successfully, but I never received any pushed message.
1 Answer
That just registers the phone for push notifications. The device got it, but you have to write code to actually do something with it. A quick google turned up this: https://gist.github.com/1208144
Your Answer
Think you can help? Login to answer this question!