First,
you have to either rent or own a server that is responsible for
communicating with Apple's APNS servers. Yes, when pushing
notifications to your app's users, your server have to first push it
to Apple and have Apple transfer those notifications to specific
users on your behalf.
And second, implement and modify the
following methods in your delegate's .m file:
//implement these
funtions -
(void)application:(UIApplication*)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{ - (void)application:(UIApplication*)application
didFailToRegisterForRemoteNotificationsWithError:(NSError*)error { -
(void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
//modify
this one - (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions: (NSDictionary *)launchOptions {
↧
What is push notification?
↧