Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jimishshah/7e2c49a7d2345e5afa248d3cb4fb81ef to your computer and use it in GitHub Desktop.

Select an option

Save jimishshah/7e2c49a7d2345e5afa248d3cb4fb81ef to your computer and use it in GitHub Desktop.

Revisions

  1. Andrew Rohn revised this gist Aug 27, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ## From episode "5 - Setting Up Universal Links (Deep Linking)" on the [Inside iOS Dev Podcast](http://insideiosdev.com)

    ### 1) Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [x] Create `apple-app-site-association` text file without `.json` file extension
    - [ ] Create `apple-app-site-association` text file without `.json` file extension
    - [ ] Use `application/json` MIME type for the text file
    - [ ] Have the following contents of the file similar to this format:
    ```json
  2. Andrew Rohn revised this gist Aug 27, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ## From episode "5 - Setting Up Universal Links (Deep Linking)" on the [Inside iOS Dev Podcast](http://insideiosdev.com)

    ### 1) Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [ ] Create `apple-app-site-association` text file without `.json` file extension
    - [x] Create `apple-app-site-association` text file without `.json` file extension
    - [ ] Use `application/json` MIME type for the text file
    - [ ] Have the following contents of the file similar to this format:
    ```json
  3. Andrew Rohn revised this gist May 12, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## From episode "5 - Setting Up Universal Links (Deep Linking)" on the [Inside iOS Dev Podcast](https://insideiosdev.com)
    ## From episode "5 - Setting Up Universal Links (Deep Linking)" on the [Inside iOS Dev Podcast](http://insideiosdev.com)

    ### 1) Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [ ] Create `apple-app-site-association` text file without `.json` file extension
  4. Andrew Rohn revised this gist May 12, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## From episode "5 - Setting Up Universal Links (Deep Linking)" on the [Inside iOS Dev Podcast](insideiosdev.com)
    ## From episode "5 - Setting Up Universal Links (Deep Linking)" on the [Inside iOS Dev Podcast](https://insideiosdev.com)

    ### 1) Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [ ] Create `apple-app-site-association` text file without `.json` file extension
  5. Andrew Rohn revised this gist May 12, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    ## From episode "5 - Setting Up Universal Links (Deep Linking)" on the [Inside iOS Dev Podcast](insideiosdev.com)

    ### 1) Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [ ] Create `apple-app-site-association` text file without `.json` file extension
    - [ ] Use `application/json` MIME type for the text file
  6. Andrew Rohn revised this gist May 10, 2017. 1 changed file with 21 additions and 3 deletions.
    24 changes: 21 additions & 3 deletions iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ### Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    ### 1) Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [ ] Create `apple-app-site-association` text file without `.json` file extension
    - [ ] Use `application/json` MIME type for the text file
    - [ ] Have the following content of the file:
    - [ ] Have the following contents of the file similar to this format:
    ```json
    {
    "applinks": {
    @@ -20,4 +20,22 @@
    }
    ```
    - [ ] “apps” key must contain an empty array
    - [ ] adjust the contents in “details” key as necessary (see [this apple doc](https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1) for reference)
    - [ ] Adjust the contents in “details” key as necessary (see [this apple doc](https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1) for reference)

    ### 2) 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.
    - [ ] Make it publicly available (with no redirects or 40x) under `mywebsite.com/apple-app-site-association`
    - [ ] You don’t have to encrypt the AASA file if it’s served over HTTPS to iOS >=9.0. Otherwise, you will need to encrypt it.

    ### 3) Prepare your app to handle universal links.
    - [ ] Add an entitlement that specifies the domains your app supports. (Add them in format: `applinks:www.mywebsite.com` `applinks:mywebsite.com` `applinks:subdomain.mywebsite.com`)
    - [ ] Update your app delegate to respond appropriately to `application(_:continueUserActivity:restorationHandler:)`. Receives an `NSUserActivity` object. If activityType is `NSUserActivityTypeBrowsingWeb`, then that means it was Universal Link. Access the `webpageURL` property to receive NSURL user tapped on.

    ### Useful links
    - https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html
    - https://blog.branch.io/how-to-setup-universal-links-to-deep-link-on-apple-ios-9/
    - https://www.raywenderlich.com/128948/universal-links-make-connection

    ### Some notes and gotchas
    - Use Apple AASA validator online. https://search.developer.apple.com/appsearch-validation-tool
    - The AASA file is downloaded every time you installed your app. So, uninstall/install to redownload the AASA file after changes are made to it.
    - If you long press on a link and select to Open in Safari then Apple will remember that choice and default to opening in Safari. So you’ll have to long press link again and choose your app to make that the new default.
  7. Andrew Rohn revised this gist May 10, 2017. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ### Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [ ] create `apple-app-site-association` text file (note: without `.json` at the end)
    - use `application/json` MIME type for the text file
    - have the following content of the file:
    - [ ] Create `apple-app-site-association` text file without `.json` file extension
    - [ ] Use `application/json` MIME type for the text file
    - [ ] Have the following content of the file:
    ```json
    {
    "applinks": {
    @@ -19,5 +19,5 @@
    }
    }
    ```
    - “apps” key must contain an empty array
    - adjust the contents in “details” key as necessary (see [this apple doc](https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1) for reference)
    - [ ] “apps” key must contain an empty array
    - [ ] adjust the contents in “details” key as necessary (see [this apple doc](https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1) for reference)
  8. Andrew Rohn revised this gist May 10, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ### Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [x] create `apple-app-site-association` text file (note: without `.json` at the end)
    - [ ] create `apple-app-site-association` text file (note: without `.json` at the end)
    - use `application/json` MIME type for the text file
    - have the following content of the file:
    ```json
  9. Andrew Rohn revised this gist May 10, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ### Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [ ] create `apple-app-site-association` text file (note: without `.json` at the end)
    - [x] create `apple-app-site-association` text file (note: without `.json` at the end)
    - use `application/json` MIME type for the text file
    - have the following content of the file:
    ```json
  10. Andrew Rohn revised this gist May 10, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ### Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - [] create `apple-app-site-association` text file (note: without `.json` at the end)
    - [ ] create `apple-app-site-association` text file (note: without `.json` at the end)
    - use `application/json` MIME type for the text file
    - have the following content of the file:
    ```json
  11. Andrew Rohn revised this gist May 10, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ### Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - create `apple-app-site-association` text file (note: without `.json` at the end)
    - [] create `apple-app-site-association` text file (note: without `.json` at the end)
    - use `application/json` MIME type for the text file
    - have the following content of the file:
    ```json
  12. Andrew Rohn revised this gist May 10, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion iOS Universal Links Support Checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    ### Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - create `apple-app-site-association` text file (note: without `.json` at the end)
    - use `application/json` MIME type for the text file
    - have the following content of the file:
  13. Andrew Rohn revised this gist May 10, 2017. No changes.
  14. Andrew Rohn renamed this gist May 10, 2017. 1 changed file with 0 additions and 0 deletions.
  15. Andrew Rohn created this gist May 10, 2017.
    23 changes: 23 additions & 0 deletions iOS Universal Links Support Checklist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
    - create `apple-app-site-association` text file (note: without `.json` at the end)
    - use `application/json` MIME type for the text file
    - have the following content of the file:
    ```json
    {
    "applinks": {
    "apps": [],
    "details": [
    {
    "appID": "9JA89QQLNQ.com.apple.wwdc",
    "paths": [ "/wwdc/news/", "/videos/wwdc/2015/*"]
    },
    {
    "appID": "ABCD1234.com.apple.wwdc",
    "paths": [ "*" ]
    }
    ]
    }
    }
    ```
    - “apps” key must contain an empty array
    - adjust the contents in “details” key as necessary (see [this apple doc](https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1) for reference)