LoginSignup
15
5

More than 1 year has passed since last update.

iOSアプリのユニバーサルリンクの設定方法

Posted at

はじめに

調べると古い情報が出てきがちなのでまとめました
iOS14,iOS15時代のものです

目次

  1. ユニバーサルリンクにしたいURLを決める
  2. apple-app-site-associationを作成する
  3. apple-app-site-associationを置く
  4. アプリ側の設定
  5. 確認

ユニバーサルリンクにしたいURLを決める

↓これにします
https://sampleApp/app

apple-app-site-associationを作成する

apple-app-site-associationを自分で作成します
自分で作らないと大変なことになります

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "{teamId}.{bundleIdentifier}",
                "paths": [ "/app/*" ]
            }
        ]
    }
}

apple-app-site-associationを置く

apple-app-site-associationを
https://sampleApp/.well-known/apple-app-site-association
に配置します

正しく配置できているかここで確認できます

アプリ側の設定

対象のアプリのIdentifiersから下記を設定

Xcodeから下記を設定

コピペ用
applinks:sampleApp

確認

iPhoneからhttps://sampleApp/appにアクセスしてアプリに遷移すれば完了

15
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
5