ios 8 interactive notifications not showing actions

前端 未结 1 1542
独厮守ぢ
独厮守ぢ 2021-01-21 18:35

This is my code to register Interactive Notifications for ios8 :

+ (void)registerInteractiveNotifications
{
    UIMutableUserNotificationCategory *corideInviteCa         


        
相关标签:
1条回答
  • 2021-01-21 18:51

    Check for the following in you code if it is anywhere else as well:

     [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
    

    Since, UIUserNotificationSettings is singleton, whenever you call this, it overwrites the old settings. So if new settings is registered without any buttons it will not show any buttons.

    Better way of registering new setting is explained here: Interactive push notifications - Hide/Show buttons

    0 讨论(0)
提交回复
热议问题