0
我有一个ios项目pushnotification
当从后端添加任何事件启用。所有工作都很好;显示badge
,alert
,sound
一切正常,但'banner
'除外。当应用程序处于背景模式时,横幅未显示,我认为从我们身边没有任何代码可用于“横幅”。这是我如何注册pushnotification
。Pushnotification横幅没有显示 - ios9
UIUserNotificationType types = UIUserNotificationTypeBadge |
UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
UIUserNotificationSettings *mySettings =
[UIUserNotificationSettings settingsForTypes:types categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:mySettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
您是在模拟器还是在iDevice上运行您的应用程序?推送通知不会显示在模拟器上。 –
你注册了你的设备令牌吗? –
@GijsSotthewes我在设备上运行,我收到每个通知,我只在通知触发时显示横幅问题。 –