Restarting iPhone application after [UIApplication sharedApplication] openURL

As the title says, I would like to know how to restart the iPhone app after that:

[[UIApplication sharedApplication] openURL:[NSURL UrlWithString:@"tel://0123456789"]]

It seems pretty simple since I saw a lot of topics that also talked about restoring the state of the application itself when openURL is openURL , but I cannot find how easy it is to restart the application when the call is completed.

Is this the default behavior? For me, the iPhone opens Favorites after the call ends, I don’t know why.

+4
source share
5 answers

You can not. Running the application is the sole responsibility of the user, which I consider good.

+4
source

check out the discussion here: https://devforums.apple.com/message/128046#128046 create a UIWebView to load the phone url like this:

  UIWebView *webview = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; [webview loadRequest:[NSURLRequest requestWithURL:url]]; 
+4
source

just use

 [[UIApplication sharedApplication] openURL:[NSURL UrlWithString:@"telprompt://0123456789"]] 

He will return to the application after the call is completed.

+3
source

You cannot restart the application after a telephone conversation, as your application has completed and your code no longer starts.

If you want to restart after the user visits the web page, you can put a link to the user diagram on this web page and register it in your application. Then the user can click the link to open the application again.

+1
source

http://www.youtube.com/watch?v=oJSTM-A_s_w This application may return to the application after calls.

0
source

Source: https://habr.com/ru/post/1316644/


All Articles