Reputation: 574
I need to detect the running application when my ios app is in the background. Basically I need to know if the user launched the Safari app?
Is there any way to do this? as I know when an app is in background, it may suspended or it could do only a minimal of things. Any help is very much appreciated.
Upvotes: 1
Views: 215
Reputation: 14427
One caveat is that within your app, you can test for another app being available:
- (BOOL)canOpenURL:(NSURL *)url
This can tell you whether the current device has a specific application installed IF that application is setup to handle url schemes for launching from another app.
Upvotes: 2
Reputation: 12405
you can only detect if your app is going to the background, no info is available regarding others apps.
Upvotes: 2
Reputation: 49354
No, there is no such way. Anything you're trying to know outside the scope of your app is forbidden by Apple.
Upvotes: 1