I want to add Apple push notification service to my app.The detail is:
my app will store some important personal data,so ,i want to sure that when someone lost s/he's iPhone,s/he can report to the server which provide service to my app.When the server receive the report,it'll send a notification to the APNS,then the APNS send a push notification to the iPhone and call that app to delete the relative data. Here is my question:
How to begin all these? Should I apply any certification or ID?
Is it poss开发者_如何学运维ible to call a app that might not be running at the time to delete some data?
I'd head on over to Urban Airship and play around with their implementation of Apple Push Notifications. They have a sample application you can extend to fit your need and great step-by-step documentation on how to get your sample application up and running.
A number of "where is my iPhone" app's out there are already using the approach you are describing to geographically locate an iPhone.
Happy coding!
There are tons of information in Apple Developer:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html
The easyest way to do a quick test is look into easyapns documentation. When you create your AppID in the iOS Provisioning Portal you must configure it for Apple Push Notification service (read the "how to" tab).
There is no problem if your app is not running, when a Push is recieved, your app will be notifyed by the UIApplicationDelegate
with this message:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
There is where you must place your deletion code.
精彩评论