インターコム プッシュ通知用のアプリを登録しようとしています。ここに手順があります: https://docs.intercom.io/Install-on-your-mobile-product/enabling-push-notifications-with-intercom-for-ios
彼らはobj cでこのコードを与えますが、私のアプリは迅速で、これは意味不明に見えます:
- (void)applicationDidBecomeActive:(UIApplication *)application {
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]){ // iOS 8 (User notifications)
[application registerUserNotificationSettings:
[UIUserNotificationSettings settingsForTypes:
(UIUserNotificationTypeBadge |
UIUserNotificationTypeSound |
UIUserNotificationTypeAlert)
categories:nil]];
[application registerForRemoteNotifications];
} else { // iOS 7 (Remote notifications)
[application registerForRemoteNotificationTypes:
(UIRemoteNotificationType)
(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)];
}
}
誰かがこのプロセスを迅速に行う方法を説明できますか?