iOS Smart App Banner Enterprise - ios

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">
Reference URL:
https://developer.apple.com/library/mac/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html

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.

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:
Build your own smart app banner
Set up a custom URL scheme in your app
Call custom URL from Safari
If the App is installed, the App will launch; if not, it will hang.
If hung, cancel the request, and display the banner.
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 :)

Related

IOS: App rejected because of App Tracking Transparency on WebView

I'm working on an app made in React Native with Expo.
It uses a web view to show the site in the app.
Everything worked well, but when I submitted my app to the App Store, it got rejected.
The mail said:
We noticed you collect data to track after the user selects "Ask App
Not to Track" on the App Tracking Transparency permission request.
Specifically, we noticed your app accesses web content you own and
collects cookies for tracking after the user asked you not to track
them.
After that, using the expo tracking transparency library, I added a permission request to track data.
If the user doesn't accept it, I disable third party cookies on the web view.
After submitting again to the App Store, I got the exact same message.
I don't know what to do, because I can't control the site, and I'm limited to the React Native web view props
Maybe, I could enable incognito mode if the user doesn't want the app to track, but I'm not sure if this will be accepted too.
i had the same issue i solved it like this:
change the privacy of the app on apple store, go to app privacy and in data types section click edit and select Identifiers (Device ID) and set this one as used for tracking purposes. and make sure that this is the only one selected as used for tracking.
also make sure that the permission is showing on real device (so test it first on TestFlight).
another thing is you need to tell them where you show this permission send them video to tell them where you show the permission.

App rejected by Apple based on design guideline

Apple rejected our app with the following response:
We noticed an issue in your app that contributes to a lower quality user experience than Apple users expect:
- Upon launching the app, a web page in mobile Safari opens first, then returns to the app. The user should be able to use the app immediately upon launch.
Next Steps
To resolve this issue, please revise your app to address all instances of this type of issue.
The app we're developing is a keyboard extension. The use-cases do not require a user to actually open the app and use it. As a result, in the app itself (should you launch it from home/springboard), we redirect the user to our website, which informs the user how to use the product (there's no registration or immediate tutorial required, but we certainly cant have the app do absolutely nothing). From Apple's response, this clearly isn't the right way. My questions:
If a user were to be redirected to Messages, could this solve the problem? The reason I ask this instead of just trying it is so that I dont waste time and end up getting rejected again.
Part of the problem seems that opening the app through springboard is misleading since it doesnt do anything. But my understanding is that we cannot have apps without icons (Create iOS app without menu icon). Do keyboard apps need to be published differently so that we dont have an icon in springboard? If so, please direct me to some documentation/Xcode configuration/resources to achieve this.
This is my first attempt at mobile development
The answer provided by #particleman was the right one. Just loading a WebView within the app was enough for Apple to accept the app.

Does app-argument on Apple Smart Banner get passed to app on install?

I've implemented a Apple Smart Banner for my app, including a app-argument with a URL I'd like the app to open on my site. I thought that would pass through when the user installs the app, but it doesn't seem to.
The steps - user visits page, doesn't have app installed, clicks View, goes to app store, installs app and then taps Open in the App Store. The app opens, but it doesn't appear to get the app-argument passed in. Note that if they then go back to the web page, the Smart Banner now says Open and that works and passes the app-argument, just not on the first install.
Have I misunderstood what is supposed to happen? If so, this makes the Smart Banner pretty much useless for me.
Gary
From the 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.
It only sends the URL param if the app is opened via the banner. If it's opened via AppStore or via SpringBoard, it won't send it.
You can do it with branch.io. More info here.
tl;dr
What Branch does is generate a custom URL specific for your device and uses the same unique configuration to fetch the data when the application is opened. Thus, you need to include their SDK into your app in order to get those arguments you want to send.
Maybe this is a bug?
From: http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
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.

IOS - how to open a website after application is removed from device

I am new to programming for iOS and need some guidance on how to link to a website after an app gets deleted. For example, when a user clicks the "X" button, removes the app and any data it stored, the code should open a website.
Is this possible?
No, Apple does not allow you to hook in the SpringBoard to detect app deletion.
There is no work around, it's not possible.

How to show a full-screen ad (like Flixster) randomly in an iOS app?

I have recently started programming in iOS. I found this really interesting way of showing an Ad in the Flixster app. It randomly pops up a latest movie banner and asks to watch trailer or skip to continue using the app. How is it actually implemented? how can they be pushing a variable screen (may be a view) at runtime? Every time you open the app, you see a different banner.
I work for Flixster and here's how we do it:
Every time the app starts or resumes, the app pings our API to ask for what ads should be shown. Our api gives our app the url of the image to be shown, as well as the click-through url, which can be a regular url, or a custom link to one of our native pages like viewing a trailer, or a movie info page.
We have an admin tool where we can upload the ad image, modify the properties of the ads, or remove old ads and add new ads. However, we've recently started using 3rd party Ad networks like DFP and Admob (acquired by Google) to take over this management.

Resources