コンテンツにスキップ

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"]
}
}
  1. 設定 origin そして domains イン plugins.CapacitorPasskey in capacitor.config.*.
  2. Run bunx cap sync.
  3. Confirm your Apple Team ID and app bundle ID, then build the TEAMID.bundleId value for the association file.
  4. Host apple-app-site-association with HTTP 200 and no .json extension.
  5. 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.
  • プラグインは同期中にネイティブプロジェクトファイルを修正できますが、ドメイン上のウェブサイト関連ファイルを作成またはホストすることはできません。