Need NSTimer running or Fire dynamic Local Notification at every certain time interval When Application is in background

As per my scenario i.e. needs to call api, then show local notification, again need to call api.

so each time 3 procedure needs to followed, even if application is active or in background.

I have tried to use NStimer for this but timer stops working when application is in background, and also I can't schedule local notification as it needs to call api before/after showing notification and also local notification content is dynamic every time.

I have also enabled background mode in xcode capabilities in that "Uses Bluetooth LE accessories".

Any other suggestion would be helpful, I just want api call before and after showing local notification

STEPS TO REPRODUCE

NSTimer should work even if application enters to background mode, after 1 hour api should be called, local notification should be displayed, again api should be called that notification is displayed.

so every 1 hour this 3 procedure needs to be followed, each time local notification content will be dynamic.

I just want timer to be running when application is in background.

Upvotes: 0

Views: 39

Answers (0)

Related Questions