対象となる人
- Firebase上での Firebase Dynamic Links の設定を終えている人
- Firebase Dynamic Links を使ったアプリ遷移ができていない人
- アプリインストール済みにも関わらず
AppStoreに遷移してしまう
人
- アプリインストール済みにも関わらず
対処法
私は以下 1〜2 の手順で確認/変更を行い無事アプリ遷移できるようになりました。
1: 「iOS 自己診断ツール」を用いて Firebase Dynamic Links の設定に不備がないか確認
iOS 自己診断ツールは、Firebaseが提供しているデバッグのプログラムで、Firebase Dynamic Links に関して検出されたエラーを含むデバッグ情報が標準出力に出力されます。
診断用のプログラムは以下の通りです。1行でOK
hoge.swift
DynamicLinks.performDiagnostics(completion: nil)
🙆♂️ アプリへ直接遷移可能
な場合の診断結果
---- Firebase Dynamic Links diagnostic output start ----
Firebase Dynamic Links framework version 10.10.0
System information: OS iOS, OS version 16.0, model iPhone
Current date 2023-06-08 08:33:17 +0000
Device locale en-JP (raw en_JP), timezone Asia/Tokyo
ERROR: UIApplication delegate <sampleApp.AppDelegate: ----------> does not implements selector application:openURL:options:. FDL depends on this implementation to retrieve pending dynamic link.
Specified custom URL scheme is -------------- and Info.plist contains such scheme in CFBundleURLTypes key.
AppID Prefix: ------, Team ID: ------, AppId Prefix equal to Team ID: YES
performDiagnostic detected 1 ERRORS.
---- Firebase Dynamic Links diagnostic output end ----
❌ アプリへ直接遷移できない
な場合の診断結果
---- Firebase Dynamic Links diagnostic output start ----
Firebase Dynamic Links framework version 10.10.0
System information: OS iOS, OS version 16.0, model iPhone
Current date 2023-06-08 08:47:29 +0000
Device locale en-JP (raw en_JP), timezone Asia/Tokyo
ERROR: UIApplication delegate <sampleApp.AppDelegate: ----------> does not implements selector application:openURL:options:. FDL depends on this implementation to retrieve pending dynamic link.
+ ERROR: Specified custom URL scheme is ---------- but Info.plist do not contain such scheme in CFBundleURLTypes key.
AppID Prefix: ------, Team ID: ------, AppId Prefix equal to Team ID: YES
performDiagnostic detected 2 ERRORS.
---- Firebase Dynamic Links diagnostic output end ----
Info.plist do not contain such scheme in CFBundleURLTypes key
: URLTypes の設定が行われてませんよ
2: URLTypeを設定
TARGETS
> Info
> URL Types
> +

※ Identifier: 任意
※ URL Schemes: アプリごと設定される Bundle ID。(確認 : TARGETS
> General
> Identify
> Bundle Identigy
)
3: 2までで解決しない場合
以下2つの動画を見て、設定を見直す。
疑問や気になったことがある場合は、コメントお願いします 🙏