# Apple technologies in detail

Companion to `../SKILL.md` for the `hig-technologies` skill.

## Identity: Sign in with Apple and passkeys

- Use `SignInWithAppleButton` with one of the permitted styles (black, white,
  white outline) and a permitted label. Size it like the other sign-in options
  and place it at least as prominently.
- Request only the scopes you need; accept the relay email address.
- Offer passkeys as the primary credential when you run your own accounts, and
  support AutoFill for existing passwords.
- Provide account deletion inside the app.

## Payments: Apple Pay and in-app purchase

- Apple Pay: use `PayWithApplePayButton` in SwiftUI, show it where checkout
  begins, and include it as an option wherever you show other payment methods.
  Display a clear order summary before the sheet appears.
- Do not show an Apple Pay button when the device cannot pay; check
  availability first.
- In-app purchase: digital goods and subscriptions use StoreKit. `StoreView`,
  `ProductView` and `SubscriptionStoreView` give compliant merchandising with
  little code.
- State price, period, trial terms and renewal plainly before purchase; make
  restoring purchases and managing subscriptions easy to find.

## Wallet

- Passes (loyalty cards, tickets, coupons, store cards) are added with
  `AddPassToWalletButton`. Keep the pass front minimal: the one number or code
  people need at the counter.
- Update passes when their information changes instead of issuing new ones.

## Siri, Shortcuts, Spotlight and App Intents

- Model the app's key actions and content as App Intents and entities; the same
  definitions feed Siri, Shortcuts, Spotlight, widgets, controls and the Action
  button.
- Provide `AppShortcutsProvider` phrases that sound natural when spoken, such as
  "Reorder my last purchase in AppName".
- Keep responses short and useful without the screen; return a snippet view
  when visual confirmation helps.
- Confirm before intents that spend money or delete data.

## Widgets, controls and Live Activities

- Widgets show glanceable, timely content and deep link to the right place.
  Support the families that fit the content, and accented and clear rendering
  modes on iOS 18 and later; test tinted and glass appearances on iOS 26.
- Controls in Control Center and on the Lock Screen perform one action or toggle
  one state.
- Live Activities track a single event with a clear end, such as an order out
  for delivery. Keep compact and minimal Dynamic Island presentations
  legible at a glance; end the activity promptly when the event finishes.

## Health and fitness

- Ask for HealthKit access only for the data types the feature uses, when the
  feature is first used, and explain why.
- Never use health data for advertising; be explicit about what leaves the
  device.
- Use Apple's terminology and units, respecting the person's locale settings.

## Home

- HomeKit and Matter accessories should use their system names and room
  assignments. Let the Home app remain the source of truth for setup where
  possible.

## iCloud

- Sync should be invisible: the same notes appear on every device without an
  explicit sync button. Handle offline edits and conflicts gracefully.
- Respect the person's choice to turn iCloud off for the app.

## Maps and location

- Use MapKit's `Map` with standard annotations and controls
  (`MapUserLocationButton`, `MapCompass`) so it behaves like Maps.
- Request "When In Use" location unless background tracking is essential, and
  show the benefit before the prompt.

## SharePlay

- Offer SharePlay where a shared experience is natural, such as reviewing a
  shopping list together. Use the system share and session UI; keep all
  participants in sync and make leaving easy.

## CarPlay

- CarPlay apps use templates provided by the framework; there is no free-form
  UI. Keep interactions few and glanceable, and never require reading long text
  while driving.

## Augmented reality

- Coach people into a good session (surface detection, lighting) with the
  system coaching view. Place content on real surfaces at believable scale and
  give a way out of the AR view.

## Apple Intelligence and generative features

- Use system features (Writing Tools, Image Playground, Genmoji) through their
  standard entry points; standard text views get Writing Tools automatically.
- For custom on-device generation with the Foundation Models framework, make it
  clear what is generated, let people edit or discard output, and handle
  unavailability when the device or region does not support the model.
