Are you sure you want to build this using local notifications and a polling mechanism? This sounds like a perfect match for a notification sent by the system that already knows about the status change (or a middleware built onto that system).
Haha, this was meant more as a rethoric question instead of writing “You probably shouldn’t do that…” but of course you can do it whatever way you want
What exactly did you try? For me it sounds like you have to start the polling at some event (order created?) and keep polling for this change. If it happens, trigger local notification. (As the app won’t be open or in the foreground at all times, you probably have to look into background processes, too)
(And then you have to figure out a way to not drain the battery with all the polling going on)
(And then figure out what to do if your background process is killed by the OS anyway)
@Sujan12 I have made condition for checking logged in user order status but i need to check every 1 minute or or every time order status of logged in user, whether app is in background state or foreground than send notification immediately. but i am unable to check status every time and send notification.
If i schedule notification every minute than it will send same notification every minute. i don’t understand what to do or m i at right track?
You can keep a list of notifications sent (that basically only includes the order_id or something) and then NOT send the notification if the order that now wouldget a notification already got one before.
@Sujan12 when i use single local notification means without using ‘every’ in local notification options array, notification not appear in my iphone if i add every its working but i need a single notification in setinterval where i am checking logged in user order status.