I have found one related question: Cannot get the new AppLinks to work on iOS or Android But I am not sure if it is entirely similar with the problem that I am facing. Thus, I created this question.
If I understand correctly from: https://developers.facebook.com/docs/applinks/ios
When I click on a proper applink with the proper meta data:-
Case 1: I have the app installed:
Expected Action 1: It will navigate to the specific page inside the app.
Case 2: I do not have the app installed:
Expected Action 2: It will direct me to the app store page of the app to download.
Here are the configurations that I have done so far:-
The App Link URL: http://watchoverme.parseapp.com/
The App Link Meta Data:
<html>
<head>
<title>Watch Over Me</title>
<meta property="al:ios:app_store_id" content="431208868"/>
<meta property="al:ios:app_name" content="Watch Over Me" />
<meta property="al:ios:url" content="watchoverme://promotion" />
<meta property="al:web:url"
content="https://itunes.apple.com/app/id431208868?mt=8" />
</head>
<body>
Yo!
</body>
</html>
On the app side, I have added the custom url scheme like the screen shot below:-
So far, I have tested a few scenarios below:-
Scenario 1: I created another simple app with a single Button to open the applink.
The code for the button:-
- (IBAction)appLinkTapped:(UIButton *)sender {
NSLog(@"appLinkTapped");
UIApplication *app = [UIApplication sharedApplication];
NSString *path = @"watchoverme://promotion";
NSURL *ourURL = [NSURL URLWithString:path];
/*
if(![app
canOpenURL:ourURL]){
path = @"http://watchoverme.parseapp.com/";
ourURL = [NSURL URLWithString:path];
}*/
[app openURL:ourURL];
}
Result 1: If I have the WatchOverMe app installed and I tap the button, I can open the WatchOverMe app. Great!. But if the WatchOverMe app is not installed and I tap on the button, nothing happens. Should I be directed to the iTunes App store to download the app? Or I did something wrong?
Scenario 2: I posted the link (http://watchoverme.parseapp.com/) on Facebook and try to tap on the link on my mobile.
Result 2: Whether I have the app installed or not, it only shows me the blank website.
The question: Am I missing something here on the configurations until it can not trigger the expected applink behavior above?
Thanks
Thanks Ming Li for pointing me to the right direction. I want to understand better on how app link works. So, I have done more testings and here is what I have found:-
From the the screen shot above:
Case A: I share the app link using the Watch Over Me app (you will see "via Watch Over Me")
Result A: When I tap on the link on the Facebook App. If I have the Watch Over Me App installed, it will redirect me to the app. If I do not have the app installed, it will redirect me to the iTunes App store to download. It is working great!
Case B: I share the app link using status update only. (without via Watch Over Me)
Result B: It will only open the blank webpage.
So, the Applink only works when we post the applink via Facebook? And not posting the Applink via our status update?
I have tested again on 1 September 2014. Both cases above have been working well! A big Thanks Ming Li.
For everyone else who doesn't work at Facebook and understand what they mean by "indicating that your app is mobile only" here is what I have found from testing:
It appears they are using the "al:web:should_fallback" meta property as a check for if your app is "mobile only" and has no web presence. This doesn't make sense as far as I can tell based on how the App Links spec defines it but what do I know.
Anyway, if you want your Facebook post to go straight to the deep link in your app and not open up the jarring webview with random app link UX treatments by Facebook then add the following meta property to your html page:
<meta property="al:web:should_fallback" content="false" />
Of course this now prevents you from sending users without the app installed to anything but the app store. However, since the webview is usually just a repeat of the Facebook post in the first place that's probably a worthwhile tradeoff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With