In my iOS 4 app, I need to open the URL from the background at the time specified by the user. However, for some reason, I cannot run the url from the background for some reason. Here is my code to open the url:
if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.stackoverflow.com"]]) {
This code is run from the daemon stream created earlier. I tested this code on a simulator and the URL does not open, and for some reason the method returns YES , but when I open the application again (via quick application switching), it opens the URL. Is there a way I can get my application back to the forefront (not through local notification) so that the URL can open, or is it a bug or an undocumented function. Also, if there is another way to open a URL that will run in the background, this will also be useful.
objective-c iphone background openurl fast-app-switching
Richard J. Ross III
source share