UNCalendarNotificationTrigger doesn't get stored unless repeats is true

后端 未结 3 1770
Happy的楠姐
Happy的楠姐 2021-01-05 22:58

I\'ve noticed that if I create an UNCalendarNotificationTrigger with a custom date it does\'t get added unless i put: let trigger = UNCalendarNotificatio

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-05 23:55

    On my app, I request permission after notification set by mistake. So If I want to get pending notification count, I got 0.

    I requested permission on AppDelegate but notifications setted on first view viewdidload(). I added a notification function to trigger with button. After get permission click button and finally setted my notification and I got pending notification count 1.

    I hope that's will help you.

提交回复
热议问题