iOS Core Location permissions with AI agents
Ask for location only when a feature needs it, prefer When In Use over Always, and put clear purpose strings in Info.plist before the system prompt. Encrypt any location you store or send. Map the capability with a skill, then run privacy-manifest and review-risk checks before submit.
Last updated:
Apple facts are from "Requesting authorization to use location services", "Configuring your app to use location services" and the Core Location framework overview on developer.apple.com. Tool facts are from each README. Stars as of 9 Nov 2026. Weather forecasts and the required WeatherKit attribution are separate from location permission; see WeatherKit with AI agents.
What Apple documents
Location data is sensitive; the system blocks use until the person grants authorization. The first prompt is a one-time interruption; the status is stored afterward.
Request authorization immediately before a feature that needs location — not at cold launch — so people understand why.
Prefer When In Use (better privacy and battery). Request Always only when necessary (e.g. time-sensitive background responses or a location push extension). Always is unavailable in visionOS.
On iOS, "in use" includes the foreground and a short time after moving to the background; enable background location updates only when you need longer background delivery.
Before collecting locations, verify services are available (Airplane mode, missing hardware, denied auth). Disable features or offer alternatives when data is unavailable.
Encrypt location data on disk and on the network; publish a clear privacy policy.
Rules for AGENTS.md
Code
- Never add Always authorization unless the product truly needs background delivery; default to When In Use.
- Do not call requestAuthorization at app launch; call it from the feature that needs location.
- Add the matching Info.plist usage string before testing the prompt.
- Encrypt any stored or uploaded location; never log raw coordinates in CI output.Step 1: map capability and plist
Use ios-capability-architect for Location capability evidence and usage-description keys.
Step 2: wire CLLocationManager
Prefer the modern update stream APIs; handle denied/restricted status without crashing features.
Step 3: privacy and manifests
Audit PrivacyInfo.xcprivacy if required-reason APIs appear beside location code.
Step 4: preflight review
Run App Store Review Risk or Store Ready before upload.
Tools compared (5)
| Tool | Best for | Agents (README) | Install (README) | License | Stars | Last push |
|---|---|---|---|---|---|---|
| iOS Capability Architect (fillbyte) | Maps location capability and Info.plist 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 scan for rejection risks tied to location misuse | Codex | npx skills add https://github.com/Kofiloski/app-store-review-risk --skill app-store-review-risk | MIT | 0 | 5 Nov 2026 |
| Apple Privacy Manifest (enoktate) | PrivacyInfo.xcprivacy / required-reason APIs that often appear with location stacks | Claude Code, Codex | npx skills add https://github.com/enoktate/Privacy-Manifest-Agent-Skill --skill apple-privacy-manifest | MIT | 0 | 23 Jun 2026 ⚠ |
| Store Ready (Medlzd) | Broader store readiness incl. plist and permission strings | 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 permission/UI code isn't 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 / plist evidence → iOS Capability Architect.
Pre-submit → App Store Review Risk or Store Ready.
Manifest side effects → Apple Privacy Manifest. AI-slop checks → mobile-unslop-mcp.
Location authorization is separate from a privacy manifest and from HealthKit permission. Manifests are in iOS privacy manifests with AI agents. HealthKit read and write permission is in HealthKit with AI agents. Showing a map is MapKit with AI agents.
A prompt that keeps the agent honest
Code
Add When In Use location for the nearby-stores feature only. Do not request Always. Add the Info.plist usage string, call authorization from that feature (not launch), and show me the entitlement and plist diff. Encrypt any cached coordinates. Stop if services are unavailable and degrade the UI.FAQ
- When should the agent request location authorization?
- Apple says to request only when someone engages a feature that needs location. Asking at cold launch or in an unrelated screen makes people more likely to deny.
- When In Use or Always?
- Prefer When In Use: updates are available while the app is used (and briefly after backgrounding on iOS). Request Always only when you need background updates or a location push extension; Always is not available in visionOS.
- What if location services are unavailable?
- Plan for Airplane mode, missing hardware, unsupported services or denied authorization. Disable location-dependent features or offer alternatives.
- How should location data be protected?
- Encrypt location data on disk and over the network, and publish a clear privacy policy that explains how you use it.
- Which tool first?
- ios-capability-architect for the entitlement and plist evidence, then a privacy-manifest audit and an App Review risk scan.