how does the notification push on ios work

You must Login before you can answer or comment on any questions.

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.

— asked 9 months ago by Mark Lee
2 Comments
  • If you want us to debug the problem, seeing the code for receivePush would be necessary.

    — commented 9 months ago by Shannon Hicks

  • @Shannon Hicks it only alert('test') in the recervePush

    — commented 9 months ago by Mark Lee

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

— answered 9 months ago by Shannon Hicks
answer permalink
1 Comment
  • now it's worked. it's very strange, I just create a new project, and use the same code, it works. any way, thank you for the gist, it's very useful

    — commented 9 months ago by Mark Lee

Your Answer

Think you can help? Login to answer this question!