diff --git a/oauth.md b/oauth.md index 31e68c0..7ad8f4e 100644 --- a/oauth.md +++ b/oauth.md @@ -75,4 +75,43 @@ curl -sL "https://bsky.syu.is/xrpc/com.atproto.identity.resolveHandle?handle=$ha plc ...no pds ...no bsky ...yes -``` \ No newline at end of file +``` + +## ios app + +1. Universal Links とは + +iOSがWebのURLを直接アプリで開く仕組みです。 + +ユーザーが https://card.syui.ai/oauth/callback にアクセス + ↓ +iOS が .well-known/apple-app-site-association を確認 + ↓ +appID が一致するアプリがインストールされていれば、アプリで開く + +2. apple-app-site-association の役割 + +```json +{ + "applinks": { + "apps": [], + "details": [{ + "appID": "${TEAM_ID}.ai.syui.card", + "paths": ["/oauth/callback", "/oauth/callback/"] + }] + } +} +``` + +3. app.json での設定 + +```json +{ + "ios": { + "associatedDomains": [ + "applinks:card.syui.ai" + ] + } +} +``` +