Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Universal Links

Universal Links

Saritasa team meeting

Agapov Alex

August 04, 2017
Tweet

More Decks by Agapov Alex

Other Decks in Programming

Transcript

  1. Setup Mobile Web + 1. Associated domains 2. AppDelegate’s application(_:continue:restorationHandler:)

    1. File apple-app-site-association at root 2. Manageable {Team ID}.{App Bundle ID} and path
  2. Setup AppDelegate’s conformance to method func application(_ application: UIApplication, continue

    userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool { guard userActivity.activityType == NSUserActivityTypeBrowsingWeb, let url = userActivity.webpageURL else { return false } return false }
  3. Setup apple-app-site-association file (no extension) appID: {Team ID}.{App Bundle ID}

    paths: “*”, “/“, “post/*” { "applinks": { "apps": [], "details": [ { "appID": "97CJYDC5AL.com.saritasa.test.UniversalLinks", "paths": ["*", "/"] } ] } }
  4. Test 1. Open link from outside (i.e. Telegram) won’t work

    if it’s link inside app 2. Tap on top button to enter this page in-app 3. App opens on defined page :)
  5. + – Pro’s & Con’s 1. Needs button tap to

    move into app 2. Still needs full web-app support (like schemes) 1. Configurable pages: i.e. multiple content, help/faq/home 2. Supports http:// https:// (doesn’t need new schemes) Con’s Pro’s