Set default iOS local notification style for application

前端 未结 6 446
囚心锁ツ
囚心锁ツ 2020-11-28 09:25

Starting with iOS 5, there are two notification styles: banner and alert (the \"old\" style). A user can set which style to use for each application in the settings. However

6条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-28 09:58

    have you tried

    [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
    

    in your didFinishLaunching method, this won't help those updating but should enable alerts for those first installing

提交回复
热议问题