Jungwon
Jungwon

Reputation: 996

Universal Link works in Safari browser, but not in Chrome

I am testing on IOS 15.5 and IOS16.4.1.

1. Add the code to Info.plist and

<key>CFBundleURLName</key>
    <string> Bundle ID </string>
    <key>CFBundleURLSchemes</key>
    <array>
        <string> myScheme </string>
    </array>

2. Add Associated Domain.

3. Make AASA file and upload server(path : .well-known/applep-app-site-association).

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "<TeamID>.<Bundle ID>",
        "paths": [ "/test/connect.asp" ]
      }
    ]
  }
}

In this way, the universal link runs normally in the safari browser.

But it doesn't work in chrome browser. I don't know if there is a setting that needs to be added or if chrome doesn't support universal links anymore, thanks.

Upvotes: 4

Views: 2047

Answers (1)

Jungwon
Jungwon

Reputation: 996

apple no longer provides universal link for browsers other than safari.
So I implemented both url sheme and universal link. universal link was written in the question, so please refer to the question.

1. Register url scheme.

  • xcode -> project -> target -> info -> URL Types. enter image description here

    2. sheme processing

let url = URL(string: "yourUrlSheme:Vacation?index=1")


UIApplication.shared.open(url!) { (result) in
    if result {
       // The URL was delivered successfully!
    }
}

See the article below for details.
https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app

Upvotes: 1

Related Questions