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

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.

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.

Necessary user info when publishing to AppStore

I want to publish an app to AppStore.
The app is based on HTML/CSS/JS and basically just a WebView which loads local web content.
Nothing is being collected as user info or anything else.
The only thing that needs Internet connection is the AdMob banner to be shown.
In order not to get rejected, what are the necessary information I should add to my app?
e.g. Should there be a button to show a pop-up with some text saying no user data is being collected?
e.g. Is there any mandatory GDPR text I should present to the user?
Add the info at splash screen and show popup to open settings and open wifi. Most probably apple rejects on webview apps. If got rejected then add push notification feature also.

Phonegap how to come back to app screen and exit from app iOS

I am creating a phonegap application that posts the login information to my website. When user signs off I want to come back to my app. Do I just send the url location along with the post data so that I can come back? or there is another elegant way?
Also when user clicks on the iphone home button, I want the application to exit. Currently it just saves the session and the page and goes back directly to the page if I start the application again.
I am using adobe phonegap site to build and test the application
From your description, I assume that you are navigating the Phonegap WebView (which is running your app) to the URL of your website?
If so, at this point you no longer have an app to navigate back to - the WebView has lost its handle on your app. In order to "navigate back" to your app, you should use the InAppBrowser plugin to navigate to your website. This will allow you to return to your app after the user logs out from your website. You'll need to somehow communicate the logout from your website in the InAppBrowser WebView to your app in its WebView. You may be able to achieve this with cross window messaging.
You can't "exit" an app in iOS - the OS does not allow you to do this. The best you can do is use the resume event to detect when your app has been restored from the background, then manually reset your app to its initial state.

iOS Smart App Banner Enterprise

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 :)

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.

Resources