views:

23

answers:

0

Hello All I am working on apple push notification service. Now I have implemented the delegates methods as suggested in apple APNS guide. But this also says that one has to send device token received from APNS to provider server.

I am really confused about this thing.

Because when I launched application it asked me if I want to register for remote notifications but then later it never showed anything like that. At that time I had no code to handle this device token. But now it does not show anything like that even if I have deleted and reinstalled the whole application.

Any help would be greatly appreciated. My code is this

- (void)viewDidLoad {
    [super viewDidLoad];
    //registring for remote notifications
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound)];
}


- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { 
    NSLog(@"Device token is %@", deviceToken)
}

Regards, Adnan