是否可以向尚未打开应用程序的设备发送推送通知? (但已安装)。
答案 0 :(得分:1)
不,你不能。因为您必须要求注册设备才能获得令牌。
UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert |
UIUserNotificationTypeBadge |
UIUserNotificationTypeSound);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
categories:nil];
[application registerUserNotificationSettings:settings];
[application registerForRemoteNotifications];