mardi 5 septembre 2017

How to implement DeepLinking with simple Example Using swift?

I have 3 requirement for DeepLinking or Universal Links to my project.

  1. If user is having the application then URL should redirect to application with content.
  2. If user don't have the application then it should redirect to Appstore.
  3. If user don't have the application then it should redirect to Appstore and after download the app it should go to that page with data which I am sending with URL.

Links which I followed:

  1. http://ift.tt/1r009Vt
  2. http://ift.tt/2clVANY.
  3. http://ift.tt/2fDhQVo.
  4. http://ift.tt/2x7wZLI
  5. http://ift.tt/2xLZw6I
  6. http://ift.tt/1M6egAQ.

What I understood is:

Creating and Uploading the Association File and for this I have to follow some steps:

Adding support for universal links is easy. There are three steps you need to take:

Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle. Upload the apple-app-site-association file to your HTTPS web server. You can place the file at the root of your server or in the .well-known subdirectory. Prepare your app to handle universal links.

Creating and Uploading the Association File

To create a secure connection between your website and your app, you establish a trust relationship between them. You establish this relationship in two parts:

An apple-app-site-association file that you add to your website A com.apple.developer.associated-domains entitlement that you add to your app

Preparing Your App to Handle Universal Links.
In your com.apple.developer.associated-domains entitlement, include a list of the domains that your app wants to handle as universal links. To do this in Xcode, open the Associated Domains section in the Capabilities tab and add an entry for each domain that your app supports, prefixed with applinks:, such as applinks:www.mywebsite.com.

Problem is: I followed all steps and I have a url I added it in the domain in my Associated Domain.

Example: https://<My_Domain>/anything. Now Backend is generating URL and sending.

Example:

Route::get('appstore',function(){ return redirect()->away('http://ift.tt/1ofi9qH');}); 

Problem is when I am clicking on that URL I am not getting any popup for already app and also After download how data I will get ?

Am missing something or backend is missing something?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire