Show alert when app is in background or another app is in foreground

Hello

I want to prompt user on iphone with a alert or UI component have "YES" & "NO" button, while user is using any other app or app is in background. I am able to execute code while app in background mode but UI objects are not working.

(Not Push Notification)

Please guide.

Post not yet marked as solved Up vote post of manishFremont Down vote post of manishFremont
1.5k views

Replies

Simple answer: You can't. Because background apps don't get to interrupt the user without prior permission.


The best you can do is post a notification that the user may or may not ignore, assuming you've previously asked for permission to post notifications when your app had been in the foreground.