0

I am able to open another application from my application using URL Schemes on a button click or app in foreground. By using the below code.

 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"urlscheme://"]];

But, I can not open the application if my application from background. I have enabled background fetch - It is woking fine. How can I open the application when background task is running ?

Vineesh TP
  • 7,755
  • 12
  • 66
  • 130
  • You can't, iOS does not allow apps in the background to call `openURL:` – rckoenes Feb 10 '17 at 12:40
  • But, It is not mentioned in the document. Is there any reference available ? – Vineesh TP Feb 10 '17 at 12:41
  • No there is not documentation stated that it is not possible, but a small search would have resulted in many post where people are saying that it will not work. If you want documentation where is document with what is allowed in the background:https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH5-SW4 – rckoenes Feb 10 '17 at 12:45
  • there is no public api avaliable for ur concept – Anbu.Karthik Feb 10 '17 at 12:50

1 Answers1

0

You can not open app in background because In background you can shared resourced , user data.

You can use remote and local notification.

Nidhi Patel
  • 1,222
  • 11
  • 17
  • The OP is not asking how to open his app in the background, he is asking how his app can open another app while his app is in the background. – Gruntcakes Feb 10 '17 at 21:50