2016-07-22 221 views
0

我正在使用AWS推送通知來發送通知ios設備。在iOS中,im仍然無法在AWS中註冊設備令牌,我只能通過AWS控制檯發送通知。請指導我如何在didRegisterForRemoteNotificationsWithDeviceToken委託中註冊令牌。如何在aws sns中註冊iOS設備令牌以接收推送通知?

我只想直接發送通知給特定的iOS設備...

在此先感謝...

回答

0

你應該寫在這裏:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:  (NSDictionary *)launchOptions { 
// Override point for customization after application launch. 
UIUserNotificationSettings *settings = [UIUserNotificationSettings  settingsForTypes:UIUserNotificationTypeBadge | 
                         UIUserNotificationTypeAlert | 
                         UIUserNotificationTypeSound categories:nil]; 
[[UIApplication sharedApplication] registerUserNotificationSettings:settings]; 
[[UIApplication sharedApplication] registerForRemoteNotifications]; 
return YES; 

}

+0

嗨huoh,我只想iOS設備令牌註冊到亞馬遜網絡服務(AWS) – user196475