Open the application using the http: // links in ios

Is there a way to open links like http://www.mydomain.app.com , so Safari will open it using the ios app? I managed to do it in android.

In ios, I managed to open links with a special scheme like somecheme: // using the URL schemes in the plist file.

But how to open an http link with a specific domain name? is it possible?

What I mean is when you enter or open the http URL from www.domain.com / ... the system offers to open it using my application

+4
source share
5 answers

iOS? Safari . SFSafariViewController UIWebView WKWebView.

, iOS 9 Info.plist. http- . YES . , , , , .

0

 [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.mydomain.app.com"]];
0

Safari ios? .

, , , , , iOS?

, :

URL- iOS

, .plist , URL-:

enter image description here

URL-, iOS openURL.

-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {

?

Btw, , , , - , URL- iOS.

, "MKB", - , , - (, iTunes, ):

MKB://DocumentNumber=100
0

Safari,

[UIApplication sharedApplication]openURL:YOUR_NSURL_INSTANCE]];
-1

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


All Articles