Scheduled LocalNotification in iOS not seen in scheduledLocalNotifications straight away -


The problem I am facing is that I have been successfully scheduling a local notification within 1 to 2 hours I'm back to my main Root View Controller, where some code runs and displays a local box, depending on whether the local notification is scheduled or not. Therefore the code is:

  /// commit notification [[UIApplication shared applicant] Schedule local notifications: Local Notification]; [Self performance CJU findifier: @ "Outostart" sender: self];  

and then a method on the main root controller is returned to refresh the view directly:

  NSArray * currentNotifications = [[UIApplication shared application] Time-bound notifications;]; If ([current notification count]> gt; {...} else {...}  

The problem is that sometimes the current notification number is 0 and sometimes, Sometimes this 1 and therefore the wrong box is displayed. I think what is happening, sometimes the iOS is still determining the notification and sometimes it does not believe that it does it in the background without blocking the thirteen?

I know that local information always goes there because if I come to you when the problem comes then it goes out and out in the root, it always gets local notification.

Can I wait to find out before searching for information? It complies with Apple's guidelines. If I am going to use information from the notification in the block.

I could not find a way to guarantee that until I came back to the main controller The information is always scheduled. So to go around this, I put the main controller in my return method to return information to the local notification. Later, returning the main controller of other areas, giving local notification 1 or 2 seconds, it needs to schedule itself and use existing logic.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -