Local Notification “Everyday at 7:00am” not notifying

前端 未结 4 513
暗喜
暗喜 2021-01-03 16:20

I want a notification to go off everyday at 7:00, but it will not go off. I also want it to show in lock screen. Here is all the code I have so far.

-(void)         


        
4条回答
  •  旧时难觅i
    2021-01-03 17:16

    You need to call

    [[UIApplication sharedApplication] scheduleLocalNotiication:localNotification];
    

    before you release localNotification. Your code does all the setup but doesn't actually schedule it, which is why you never get it.

提交回复
热议问题