An overview of the
This paper introduces the jump technology between various apps in the current iOS system, and finally focuses on a special use skill of UniversalLinks to help App to divert and improve transformation.
background
Introduce the current supported App page skipping technology and its advantages and disadvantages:
-
Scheme jump Example:
<appscheme>://detail? id=10000Copy the code
Users click scheme link in other apps in the system; Click the Scheme link in the web page of the browser, and an Alert dialog box will pop up for the user to confirm whether to jump. Advantages: Similar to the HTTP URL, you can use the URL to directly express the meaning of the page. The trigger condition can be user click, or JS or App can be triggered through the program. Disadvantages: The system will pop up a confirmation box for users to confirm when jumping, resulting in poor experience. In addition, you cannot know whether the App is installed. You can only guess whether the App you want to jump to is installed. If the App is not installed, a message “Safari cannot open this page because the URL is invalid” will be displayed. How to infer that the App has been installed on the H5 page will be introduced later.
-
Smart App Clearly integrates a meta tag into an HTML page that looks like:
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL"> Copy the code
When visiting this page, you can see the jump entrance of App by pulling down the page after the page is loaded, which can undertake the functions of the jump App. You can visit the Demo page on your mobile phone to experience the advantages: for users, clicking to enter does not require a second confirmation; Automatically detect the App installation status. If the App is not installed, it will be bootstrap to the App Store. If the App is installed, you can directly open the App and enter the URL value preset in the app-argument so that the App can sense the current page and continue the behavior in the App. Disadvantages: The biggest problem is that the jump operation cannot be controlled by the program and can only be triggered by the user’s click; Another thing product managers don’t like is the fact that the star rating is displayed, which is a headache.
-
Univeral Links since iOS9, apple has opened a new way of jumping between apps. From the perspective of user experience, apple hopes that this technology can be used to provide a better way of jumping between apps on the premise of not interrupting users’ operation behaviors. For example, if the visiting user is visiting m.Alibaba.com, then if the user has the Alibaba.com App installed, the system will automatically boot to the App and provide the full HTTP link that is being visited to the open App to provide the ability to continue the previous behavior on the App. This technology makes for a perfect experience, and in layman’s terms, it is now possible to open the App directly with an HTTP URL(HTTPS of course) without double-checking! Of course, there are still some areas to be improved, which will be discussed in more detail below.
Each of the three techniques has its advantages and disadvantages, and the combination can make the drainage experience very good. The following sections briefly describe deployment methods and techniques for the three technologies.
The deployment of
Scheme jump
This technology deployment requires the App itself to register the Scheme protocol header, and this registration is a system-level local registration association.
- Add a new Key -> “URL Types” in the info.plist file of the project.
- This will automatically create an array. Expand the first element and set the “URL Identifier “to the BundleID of your App
- There is also a Key -> URL Access Key.
- If you want to register “enalibaba://”, enter “enalibaba”. If you want to register “enalibaba”, enter “enalibaba”.
In this case, after the App is installed, the protocol header will be registered and take effect. You can jump to it by entering the protocol header in the browser address bar.
Note: Since it is registered locally, what happens if some other App registers the protocol header? The practice test results show that the protocol header is local squatting, and the first installed registered App has a higher priority. When the first installed App is deleted, the second registrant will be hit, and the next one will be pushed.
App Smart Banner
This approach is directly decentralized, de-validated, and completely free of deployment.
All you need to do is add meta tags to the HTML page
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
Copy the code
Use an iOS phone to access the address Demo page
Universal Links
This way is more troublesome, because it is equivalent to supporting HTTP links to open the App directly, so two-way credit is required.
The site end
- Create a file named
apple-app-site-association
Json-formatted files, in places where the root directory can be accessed directly. For example, if you want to bind m.Alibaba.comhttps://m.alibaba.com/apple-app-site-association
This file can be accessed normally, mine/type is json/text. - The file format is as follows
{ "applinks": { "apps": [], "details": [ { "appID": "9JA89QQLNQ.com.apple.wwdc", //bundleid "paths": ["/ WWDC /news/", "/videos/ WWDC /2015/*"] //path can be wildcard}, {// "ABCD1234.com.apple.wwdc", "paths": [ "*" ] } ] } }Copy the code
The App end
- Find Alibaba. Entitlements file
- In the inside
com.apple.developer.associated-domains
Add an item to the array of - A value of
applinks:m.alibaba.com
Can be
Of course, the App end can find Entitlements file needs to open the Capabilities of the Associated Domain, which requires the developer account project to open.
Now that bidirectional binding is done, compile the project to the device and jump to it perfectly by clicking the matching Universal Links link preset in the memo.
Why put it in a memo? Can’t you open it directly in the browser address bar? And the answer is no, because remember, apple wants to do this without interrupting the user’s intent, so by typing the address directly into the browser’s address bar, Apple assumes that the user clearly wants to go to an HTTP web page, so they’re not going to go directly to the App. Of course, the program can not control, if the JS program jumps to a UniversalLinks, the result is that the request is normally issued, and the App will not jump.
What’s more, apple actually wanted to be able to jump from App to App in this way. At the beginning OF my pro test wechat jump Alibaba.com App perfect jump. Later, there was an unconventional way to block such jumps, so that UniversalLinks is now disabled in almost all apps. I still have a solution, though, and I’ll cover UniversalLinks in detail in my next post.
Bean knowledge
The Scheme and Schema
The proper name is Scheme[skim] rather than Schema[‘ski:mə], and Scheme is always used in official documentation.
According to the dictionary, the meaning of these two words is very similar, they both mean planned.
The resources
Promoting Apps with Smart App Banners
Inter-App Communication
AppID lookup tool
Support Universal Links
The Ultimate Use of UniversalLinks