Sudheer Kumar Palchuri
Sudheer Kumar Palchuri

Reputation: 2954

openURL is not working when App is in background in iOS

I am trying to open one URL in Safari from my App when App is in background, below is my code

    [[UIApplication sharedApplication]openURL:[NSURL URLWithString:strURL]];

My App is hiting the above line during debugging, but not opening Safari with the given URL.

Upvotes: 4

Views: 2641

Answers (1)

Tapas Pal
Tapas Pal

Reputation: 7207

It's not possible, You cannot launch another app from the background state. If app in background then you can't have any event for handle your app event from iPhone/iPad screen. You must have to wake up your app. You can use local notifications.

Upvotes: 1

Related Questions