Sign in with Apple with AI agents
Enable the Sign in with Apple capability on the target, put an ASAuthorizationAppleIDButton in the login UI, and request only the full name and email you need. The device Apple ID must use Two-Factor Authentication. Let a capability skill map the entitlement, then run a review-risk check before submit.
Last updated:
What Apple documents
AuthenticationServices makes it easy for users to log into apps and services.
Apple's SIWA sample (Juice) presents a login form, authenticates with Sign in with Apple and shows account data.
Enable the Sign in with Apple capability on Signing & Capabilities so the provisioning profile includes it; use a unique bundle ID.
Put an ASAuthorizationAppleIDButton in the login UI (set the storyboard class in the Identity Inspector when using Interface Builder).
On tap, start an authorization request for the user's full name and email; the system checks whether the device Apple ID is signed in.
The run destination must use an Apple ID with Two-Factor Authentication; if the user is not signed in at the system level, direct them to Settings.
Rules for AGENTS.md
Code
- Never invent SIWA entitlement keys; add Sign in with Apple via Signing & Capabilities (or the documented capability tool).
- Use ASAuthorizationAppleIDButton — do not draw a custom Apple-logo button that violates Apple's button rules.
- Request only full name and email scopes you actually use; store tokens in Keychain, not UserDefaults.
- Test on a device/simulator signed into an Apple ID with Two-Factor Authentication.Step 1: map the capability
Install ios-capability-architect and ask it for the Sign in with Apple entitlement evidence in the project.
Step 2: add the button and request
Have the agent add ASAuthorizationAppleIDButton and the authorization request for name and email only.
Step 3: handle the credential
Process the ASAuthorization success/failure paths; never log raw identity tokens.
Step 4: preflight review
Run App Store Review Risk or Store Ready / App Review skill before upload.
Passkeys use the Associated Domains webcredentials service and are a separate request from Sign in with Apple; see Passkeys with AI agents. Universal links use applinks, not Sign in with Apple; see Universal Links with AI agents.
Tools compared (5)
| Tool | Best for | Agents (README) | Install (README) | License | Stars | Last push |
|---|---|---|---|---|---|---|
| iOS Capability Architect (fillbyte) | Maps product needs to Sign in with Apple and other capabilities with Xcode evidence | Claude Code, Cursor, Codex | npx skills add https://github.com/fillbyte/skills --skill ios-capability-architect | MIT | 1 | 4 Nov 2026 |
| App Store Review Risk (Kofiloski) | Static scanner for likely rejection risks before you submit | Codex | npx skills add https://github.com/Kofiloski/app-store-review-risk --skill app-store-review-risk | MIT | 0 | 5 Nov 2026 |
| Apple App Review (NoelOliveira1982) | Audits guidelines 1–5 (incl. login / SIWA-related review issues) | Claude Code, Cursor, Codex | npx skills add NoelOliveira1982/apple-app-review-skill | MIT | 0 | 3 Jul 2026 ⚠ |
| Store Ready (Medlzd) | Reads Info.plist, build files and dependencies against store rules | Claude Code, Cursor, Codex, Gemini | npx skills add medlzd/store-ready | MIT | 8 | 17 Aug 2026 ⚠ |
| mobile-unslop-mcp (fikrifirmanf) | Deterministic MCP checks that AI-written auth/UI code is not review slop | Claude Code, Codex, Antigravity | claude mcp add mobile-unslop -s user -- npx -y mobile-unslop-mcp | MIT | 0 | 22 Oct 2026 ⚠ |
⚠ = no push in the last 4 weeks.
Which one to pick
Capability and Xcode evidence → iOS Capability Architect.
Pre-submit risk → App Store Review Risk (Codex) or Apple App Review / Store Ready.
Catch AI slop in the auth UI → mobile-unslop-mcp.
A prompt that keeps the agent honest
Code
Add Sign in with Apple to the login screen. Enable the capability through the documented path only, use ASAuthorizationAppleIDButton, request full name and email, and show me the entitlement diff. Do not invent keys. Stop if Two-Factor Authentication is missing on the run destination.FAQ
- What capability does Sign in with Apple need?
- In Xcode's Signing & Capabilities pane, add Sign in with Apple so the provisioning profile includes it. Apple's sample configures the project that way before the ASAuthorizationAppleIDButton will work.
- Which button class should the agent use?
- ASAuthorizationAppleIDButton from AuthenticationServices. On a storyboard, set the control's class to ASAuthorizationAppleIDButton in the Identity Inspector.
- What does the authorization request ask for?
- Apple's sample requests the user's full name and email address, then starts the authentication flow when the button is tapped.
- Why does the sample fail on some devices?
- The run destination must be signed in with an Apple ID that uses Two-Factor Authentication. If the user is not signed in at the system level, the app should direct them to Settings.
- Which tool should I install first?
- ios-capability-architect to map the capability and evidence, then an App Review skill or Store Ready before upload.