scheduled local notification is not being stored in the scheduledLocalNotification array

后端 未结 3 1775
走了就别回头了
走了就别回头了 2021-01-22 04:15

I am currently scheduling local notifications to appear once per day at 6PM if a user has not already opened the app that day. If the user has already loaded the application, th

3条回答
  •  梦毁少年i
    2021-01-22 04:53

    localNotification.fireDate = fireIn;
    

    in this line check wheather "fireIn" is object of NSDate or NSString.

    If it's NSString convert it into NSDate object with help of NSDateformatter and then assing it to localNotification fireDate.

    I was facing same problem previously and resolved it with above mentioned steps.

提交回复
热议问题