Yogesh Kumar Gupta
Yogesh Kumar Gupta

Reputation: 19

Universal link is not working in IOS 12.1?

I've created a demo project for enable universal link and followed all the below steps -

  1. Enable the Associated domains in AppId
  2. Edit provisioning profiles
  3. In Project - Enable Associated domain and also add domain link (mobiledemo.socialengineaddons.com) , no any error is coming
  4. Domain link is also show in seiosnativeapp.entitlements file
  5. I manually added seiosnativeapp.entitlements file , in Copy Bundle Resources (Build Phases)
  6. Handle link activity in AppDelegate (Swift 4.2 ,Xcode 10.1) - AppDelegate :

    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {

    print("Activity")
    if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
        let url = userActivity.webpageURL!
        print(url.absoluteString)
    
        //handle url and open whatever page you want to open.
    }
    
    window = UIWindow(frame: UIScreen.main.bounds)
    let ViewController = UIViewController()
    window?.rootViewController = ViewController
    window?.makeKeyAndVisible()
    return true
    

    }

  7. My AppId and prefix both are same

  8. Create a apple-app-site-association File and Placed in .well-known folder :

    https://mobiledemo.socialengineaddons.com/.well-known/apple-app-site- association

  9. My domain name is also ssl certified and also i've use this command to remove validator error -

    Sign apple-app-site-association association

    sudo touch json.txt | openssl smime -sign -inkey myserver.key -signer mobiledemo.socialengineaddons.com.crt -noattr -nodetach -outform DER

    apple-app-site-association

  10. Link Validator : Successfully validate domain (mobiledemo.socialengineaddons.com)

    https://branch.io/resources/aasa-validator/#resultsbox https://limitless-sierra-4673.herokuapp.com/

Note: When we place apple-app-site-association file on root , validator gives error, so we placed this on .well-known folder 11. When i added my website link on Notes (IOS app) https://mobiledemo.socialengineaddons.com and long press , it not show any open to open in my app also when i click on this link every-time it's open in safari instead of app 12. I've followed below reference Links :

    https://medium.com/@abhimuralidharan/universal-links-in-ios- 
    79c4ee038272
    https://www.raywenderlich.com/6080-universal-links-make-the- 
    connection
    https://www.youtube.com/watch?v=IEXn7QIwPFo

13. It'll very help-full to me, if you provide any suggestions to enable universal link , Thanks In Advance [1]: https://i.sstatic.net/rQBTW.png [2]: https://i.sstatic.net/esB8f.png

   [1]: http://%20com.seao.seiosnativeapp

Upvotes: 1

Views: 1969

Answers (1)

ZeroOne
ZeroOne

Reputation: 684

In Capabilities add app-links prefix and colon. applinks prefi is mandatory. So it would look like below.

applinks:mobiledemo.socialengineaddons.com

Upvotes: 1

Related Questions