Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apple-itunes-app meta tag testing

I am adding apple-itunes-app meta tag in my web site for up-selling to my iOS app. When the app is not installed, i see "View this app" in the web site banner which is good.

My question is about how to test the deep-linking? When I install a dev build on my device, I am still seeing "View this app" instead of Open this app. I would like to check if all the properties are passed in correctly and deep-linking is working before I send my app to production.

One strategy that I can think of is just sending deep link into the app via app protocol scheme but that is not proper E2E testing.

Are there any other ways to test apple-itunes-app meta tag?

like image 980
Kenny Lim Avatar asked Jan 31 '17 19:01

Kenny Lim


1 Answers

Assume you are using smartbanner as mention by apple. I would suggest to use your own banner in web site. Use URL schema in your application.For eg: you set appName. To set URLSchema follow below steps in application code:

Select the Info.plist file in the project and add a new row. Name the new key CFBundleURLTypes and expand the newly added key. In item 0, add another key named CFBundleURLSchemes and set its Item 0 value to “appName”. Add one more key named CFBundleURLName. Set its value to “com.companyName.appName”.

Then use below code in ur web page. To check url for app and if it not reachable for 25 seconds then we call itunes link to open appstore to install app.

var now = new Date().valueOf();
setTimeout(function () {
    if (new Date().valueOf() - now > 100) return;
    window.location = "https://itunes.apple.com/(applicationPath)";
}, 25);
window.location = "appName://";
like image 180
sschunara Avatar answered Oct 02 '22 02:10

sschunara