iOS migration from Website to app - ios

iOS. I have a mobile web site and a mobile app for the same. i want the user to be able to navigate from web to my app through a link. Is it possible for this feature to be feasible when the app is not installed. I know i can use smart app banners when the app is already installed and this feature can be implemented then. But the main problem i am facing is when the user is asked to install the app (from smart app banners) for a particular page of my website. How can i automatically redirect the user to same page on my app from where he clicked the app banner on first launch of app ?

This is a problem that Branch, the company I'm working for, solves. It's actually fairly simple to explain, but quite a bit more tricky to implement yourself.
Apple doesn't currently allow you to persist information like that through an install (through the App Store), so you'll need an intermediate server. Now, depending on what devices you want to support, this gets more and more tricky. You mentioned you're only on iOS now, but if you expand to Android, this becomes even more complicated (with the fragmentation of Android devices and browsers, etc). For now, I'll just explain for iOS though. It's basically a two step process, starting with the smart banner on your mobile web page.
The smart banner, when clicked, will try to
* Launch the app if possible. We do this by trying to load via the app's URI scheme.
* If the URI Scheme fails (not installed), we send a device fingerprint to our servers based on IP, model, etc. and then send the user to the app store.
The second part is then within the app:
* When it launches, it needs to ask the server if it was launched via a link click. (whether directly into the app or through the app store and now into the app).
* It sends along a similar fingerprint, and then the server (if the device matches) will send back the relevant info (the page id, or whatever you use).
* If the page id is present, you need to present the view controller with that content to the user (you may need to persist this info in your app through a login, if it's behind an auth wall).

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.

Putting information into a newly installed app

I have to create an iOS app, which needs to know a referral code right after the installation. The code comes from an email or from a link in the browser. The goal is to make the app have the referral code no matter it is already installed on the user's device or it is being installed by the clicking of the link.
What I know already:
I have to register an URL scheme with my app, for example myapp://
I have to handle opening by this URL, recognizing the referrer code from it (myapp://refcode=123)
I have to have a web service, which detects (with JavaScript) if the user's device can handle my URL scheme or not (like this: https://stackoverflow.com/a/6599773/511878)
If the app is not installed, I can send the user to the App Store to download it, otherwise I can open the app by this URL and transfer the information into it
What I miss: How can I immediately call this URL after installation?
I was sure this is impossible to do until this morning, when I've found that Apple's TestFlight is doing exactly the same. I've got an email containing an invite to some app, clicked on the link, and because I did not have TestFlight installed on that device so far, it brought me to the App Store, where I clicked install. The device installed TestFlight app. After this I've clicked the Open button in the Store, which immediately showed the invite for me.
I think the solution can't be that it recognized me, and picket up the invite from the server based on my user account, because I might have multiple invites, so it had to know which exact one to show.
EDIT: Video of this happening: http://gk.lka.hu/x/tf.mov
So the question is: How can I transfer information into an app which is being installed after a link is clicked without reclicking the link?
I'm a developer at Branch and we recently built this system for others to use. If you want to build a similar system from scratch, here is an example of what you'll have to do:
The web service you described above must capture some information from the user, such as IP address, OS, OS version, screen size, etc., before redirecting to the App Store. It should associate this with the link that was clicked, or at least the refcode from the link (http://yoursite.com/redirect?refcode=123).
After your app is downloaded, the first time it opens, send up the same info (IP Address, OS, etc.) up to your server. If your server sees these params and that they're the same as what you grabbed in step 1, it should pass back refcode=123 to your app.
Your app should then handle the 123 refcode however you see fit (e.g. open to the appropriate view controller, apply the referral code, etc.).
Hopefully that helps. It's definitely harder than it sounds to build from scratch..

Deep link after iOS app installed (Deferred deep linking)

How can you solve this scenario:
User is using Safari on iOS. They click a link on a website that says
"View Profile on our app". The user does not have the app, they are
taken to the app store to download the app. After they open the app,
the app immediately loads the profile screen (instead of the main
screen).
Currently in order for us to solve this problem, when the app is installed we immediately open Safari to grab the session cookie, if it matches the one on the server we load the right screen. However, Apple is now rejecting our app (and others) for loading Safari at startup.
What is a valid solution that won't get rejected by Apple?
(Also note that we were exploring IDFA - which would have worked - but Apple is rejecting apps that use IDFA if the app isn't using Ads)
This is definitely possible without the IDFA.
Basically, create a URL endpoint on your server that will 302 to the App Store on GET. When a user clicks this link, collect IP Address, OS, OS version, device model, screen size and other parameters and store it as a browser fingerprint.
Then, after the user installs your app, send the same array of meta data to your server as a device fingerprint. Your server can then match this device fingerprint to the browser fingerprint. If there's a match, you can be very certain that the user originated from your link.
Just to give you an idea of numbers, we (at Branch) give this service away for free and now process hundreds of millions of these match queries per day. We've seen that if a user will install, 99% of them will do it within the first 60 minutes. Just empirically, we estimate that this mechanism, with a short window of 2 hours is very close to 100% accurate.
For an added benefit, if you collect IDFA, you can drop a cookie on the browser on redirect and then store the matched pair to the IDFA to create a semi-permanent alternative to the fingerprinting mechanism I mentioned above. If someone clicks your link again, and you've got a cookie stored in the browser, you'll know who they are when they send their IDFA back to your service on install because you've seen that story play out before.
The best solution requires IDFA, which you are in fact allowed to collect for the purpose of deferred deep linking. The "Apple IDFA Scare" was a bit overblown in the media, and Apple revised its T&Cs to make it more clear. Apple also allows you to collect IDFA if you are an advertiser, for attributing installs, or for attributing post-install actions. In other words, you don't have serve ads in your own app in order to collect IDFAs.
Here's a link to the current Apple policy (https://developer.apple.com/news/?id=08282014a ), and this article from AdExchanger goes into a little more detail (http://www.adexchanger.com/mobile/apple-throws-a-bone-to-app-marketers-blesses-idfa-for-attribution/ )

How to detect and redirect traffic only from in-app iPhone

I see a lot of information out there about how to detect traffic by checking the user-agent of incoming traffic... but I want to detect and redirect ONLY traffic sent from within my iPhone app. To be clear, I DON'T want to redirect users who open safari on their iPhone and browse to my site.
Is this possible? How?
If you're curious, the situation is that I created a basic iPhone app which loads a UIWebView. In early versions the UIWebView loaded an external site: example.com. I've since released an update that points to iphone.example.com and I want to make better use of the original url (example.com). The release has already been accepted by the iTunes store, but I don't know of any way to make sure that all pre-existing users have updated. And I don't want break the functionality for non-updated users. Therefore, I'm looking for a way to redirect any in-app traffic (from non-updated app users) to the new endpoint: (iphone.example.com), but STILL allow normal mobile traffic to view the portfolio site at example.com.

What options exist to create a shell app for iPhones that redirect to a website?

I have a client that needed to abandon their very poor native app and needs a temporary solution immediately. They have a mobile optimized website and we'd like to deploy an app in the store to replace the current one, and design it such that as soon as you launch it, it either hosts the site within a web browser control, or just redirects the user to a website in the iPhone Safari app. I realize there are subtle differences between the browser control and the actual Safari browsers.
Are there any tools or products that auto create such simple apps, and are there any problems with getting such simple apps approved by Apple?
Sounds like you want to make a hybrid app.
http://www.cocoacontrols.com/posts/a-primer-on-hybrid-apps-for-ios
Your app could just be a UIWebView that shows the website. It's possible that Apple might reject ithe app if there is nothing to it except a web view -- do some research on that possibility.

Resources