I need a little Apple Push Notification clarification
I have a couple of quick questions. If I have a push notification server set up for an app,
- Does the app send the device token to my server when the user allows the push notifications?
- What happens when the user gets a new device, as in replaces their iPhone 3g with an iPhone 4? Do I get a new device token?
- What happens if the user has two devices with the app, as in an iPod Touch and an iPho开发者_如何学运维ne? Do they have separate device tokens?
I'm just trying to figure out what I have to worry about storing in the db server side.
thanks
1) Does the app send the device token to my server when the user allows the push notifications?
Yes, the app is responsible for doing that. The Apple documentation suggests that the app should retrieve the device token and send it to the server every time the app starts, since it may change.
2) What happens when the user gets a new device, as in replaces their iPhone 3g with an iPhone 4? Do I get a new device token?
Yes, the token changes - see 1.
3) What happens if the user has two devices with the app, as in an iPod Touch and an iPhone? Do they have separate device tokens?
That's correct.
精彩评论