Reputation: 13433
Can anyone provide some guidance regarding correct tag configuration for an enterprise Smart App Banner? The app does not appear in the Apple store; it is at a separate URL for enterprise members.
According to the docs, this can be accomplished with the addition of a meta tag, as follows:
What are each of these variables, and how are they typically set?
name: does this remain "apple-itunes-app" for an enterprise app? app-id: I have a 19-digit number for this. Could that be right? affiliate-data: What should this look like? app-argument: URL of the app?
I got this working for an App that's in the Apple App store, for Angry Birds, with the meta tag below.
<meta name="apple-itunes-app" content="app-id=343200656">
Upvotes: 3
Views: 2286
Reputation: 13433
Been a while on this one, but if memory serves, I used a custom URL scheme.
In my particular situation, the requirement was to launch the app if it exists, and if not, display the smart app banner.
In a nutshell, here is how you do it:
For example, imagine an new App called "happyBirds." In code, it looks something like this:
setTimeout(function () {
window.location = "#"; // Effectively cancels the following window.location command if the app is not installed.
$('#smartAppBanner').show(); // Make up your own smart app banner, and show it.
}, 100);
window.location = "happyBirdsCustomUrl://"; // If this is successful, the app will be launched, and the setTimeout will never fire
I was also toying with the idea of creating a custom URL scheme that simply returned "true" if the app was there, and also trying to launch the app from within an iFrame, but never got around to it. Maybe I'll give it a shot when I get a free hour or so.
Definitely take a look at the following posts for more info:
How to check if an app is installed from a web-page on an iPhone? http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
Hope this helps! Sincerely, Keith :)
Upvotes: 1
Reputation: 13783
Smart Banners are only for apps available in the App Store.
From Apple docs:
If the app is already installed on a user's device, the banner intelligently changes its action, and tapping the banner will simply open the app. If the user doesn’t have your app on his device, tapping on the banner will take him to the app’s entry in the App Store. When he returns to your website, a progress bar appears in the banner, indicating how much longer the download will take to complete. When the app finishes downloading, the View button changes to an Open button, and tapping the banner will open the app while preserving the user’s context from your website.
Upvotes: 3