0
votes
  1. how can store apns(apple push notification service) message on my local variable and i need to display the message on my alert view.

  2. any idea for apns(push notification) registration with out using application delegate?

i am using this method on application delegate for register apns

-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { }

i need some other way to register apns. help me please....

1

1 Answers

1
votes

What you want is just do something not in the application delegate.

You can declare an interface in your handler object(e.g. your view controller), or you can post a notification, and handle that notification yourself.

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[[NSNotificationCenter defaultCenter] postNotificationName:YourOwnNotificationName object:deviceToken];

}

in your - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)note you can do the similar thing.