iOS設定
インストール
iOSでは、パスキーは、ウェブサイトと同じリレーピアドメインが関連付けられているアプリとしか機能しません。
プラグインが処理するもの
「プラグインが処理するもの」というセクションプラグイン設定を追加して実行した後、 bunx cap sync生成されたiOSホストプロジェクトを修正する必要がなくなります:
- 設定済みのドメインのための
webcredentials:関連付けられたドメインエントリを追加する - 生成されたアプリターゲットが既にエンタイトルメントファイルを参照していない場合に
CODE_SIGN_ENTITLEMENTSワイヤー
ホストするためにまだ必要なもの
セクション: ホストするためにまだ必要なもの公開する必要があります apple-app-site-association 依存先ドメインで:
https://signin.example.com/.well-known/apple-app-site-association例:
{ "webcredentials": { "apps": ["ABCDE12345.app.capgo.passkey.example"] }}チェックリスト
セクション: チェックリスト- 設定
originそしてdomainsインplugins.CapacitorPasskeyincapacitor.config.*. - Run
bunx cap sync. - Confirm your Apple Team ID and app bundle ID, then build the
TEAMID.bundleIdvalue for the association file. - Host
apple-app-site-associationwith HTTP200and no.jsonextension. - Make sure the relying-party ID used by your backend matches the associated domain.
- The website file must be served from the exact passkey domain you use as the relying-party ID.
- iOS 17.4 以降では、プラグインはブラウザスタイルのクライアントデータ API を使用するため、構成された HTTPS オリジンは反映されます。
clientDataJSON. - プラグインは同期中にネイティブプロジェクトファイルを修正できますが、ドメイン上のウェブサイト関連ファイルを作成またはホストすることはできません。