corelocation

Installation
SKILL.md

Core Location

Determining the user's location, geofencing, beacons, and visits on Apple platforms. The deep API reference — setup, authorization, the live-updates stream, CLMonitor, geocoding, beacons, visits, background, battery tuning, pitfalls, a full @Observable manager — lives in references/guide.md. This file is the decision and discipline layer: read it first, open the guide for specifics.

Dials

Set these explicitly at the start; they change what "correct" means.

  1. AUTH_SCOPE — when-in-use (default; foreground only) · always (background presence, geofences, visits — only request after when-in-use is already granted and you can justify it; App Review scrutinizes this) · one-shot (LocationButton / a single requestLocation, no persisted grant).
  2. UPDATE_MODE — one-shot (single requestLocation) · live (default for continuous; iOS 17+ CLLocationUpdate.liveUpdates()) · significant-change (battery-cheap background presence) · visits (place arrival/departure, needs always).
  3. MONITORING — none · geofence (iOS 17+ CLMonitor + CircularGeographicCondition) · beacon (CLMonitor + BeaconIdentityCondition).

When to use

Building or reviewing any code that reads the user's position, monitors regions/beacons, tracks visits, or requests location permission. For drawing maps, annotations, or directions use MapKit (a later skill) — Core Location only supplies the coordinates and authorization.

Core rules

Installs
1
GitHub Stars
1
First Seen
Jun 18, 2026
corelocation — moritztucher/swift-agent-skills