axiom-core-location-ref▌
charleswiltgen/axiom · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Comprehensive API reference for modern Core Location (iOS 17+).
Core Location Reference
Comprehensive API reference for modern Core Location (iOS 17+).
When to Use
- Need API signatures for CLLocationUpdate, CLMonitor, CLServiceSession
- Implementing geofencing or region monitoring
- Configuring background location updates
- Understanding authorization patterns
- Debugging location service issues
Related Skills
axiom-core-location— Anti-patterns, decision trees, pressure scenariosaxiom-core-location-diag— Symptom-based troubleshootingaxiom-energy-ref— Location as battery subsystem (accuracy vs power)
Part 1: Modern API Overview (iOS 17+)
Four key classes replace legacy CLLocationManager patterns:
| Class | Purpose | iOS |
|---|---|---|
CLLocationUpdate |
AsyncSequence for location updates | 17+ |
CLMonitor |
Condition-based geofencing/beacons | 17+ |
CLServiceSession |
Declarative authorization goals | 18+ |
CLBackgroundActivitySession |
Background location support | 17+ |
Migration path: Legacy CLLocationManager still works, but new APIs provide:
- Swift concurrency (async/await)
- Automatic pause/resume
- Simplified authorization
- Better battery efficiency
Part 2: CLLocationUpdate API
Basic Usage
import CoreLocation
Task {
do {
for try await update in CLLocationUpdate.liveUpdates() {
if let location = update.location {
// Process location
}
if update.isStationary {
break // Stop when user stops moving
}
}
} catch {
// Handle location errors
}
}
LiveConfiguration Options
CLLocationUpdate.liveUpdates(.default)
CLLocationUpdate.liveUpdates(.automotiveNavigation)
CLLocationUpdate.liveUpdates(.otherNavigation)
CLLocationUpdate.liveUpdates(.fitness)
CLLocationUpdate.liveUpdates(.airborne)
Choose based on use case. If unsure, use .default or omit parameter.
Key Properties
| Property | Type | Description |
|---|---|---|
location |
CLLocation? |
Current location (nil if unavailable) |
isStationary |
Bool |
True when device stopped moving |
authorizationDenied |
Bool |
User denied location access |
authorizationDeniedGlobally |
Bool |
Location services disabled system-wide |
authorizationRequestInProgress |
Bool |
Awaiting user authorization decision |
accuracyLimited |
Bool |
Reduced accuracy (updates every 15-20 min) |
locationUnavailable |
Bool |
Cannot determine location |
insufficientlyInUse |
Bool |
Can't request auth (not in foreground) |
Automatic Pause/Resume
When device becomes stationary:
- Final update delivered with
isStationary = trueand validlocation - Updates pause (saves battery)
- When device moves, updates resume with
isStationary = false
No action required—happens automatically.
AsyncSequence Operations
// Get first location with speed > 10 m/s
let fastUpdate = try await CLLocationUpdate.liveUpdates()
.first { $0.location?.speed ?? 0 > 10 }
// WARNING: Avoid filters that may never match (e.g., horizontalAccuracy < 1)
Part 3: CLMonitor API
Swift actor for monitoring geographic conditions and beacons.
Basic Geofencing
let monitor = await CLMonitor("MyMonitor")
// Add circular region
let condition = CLMonitor.CircularGeographicCondition(
center: CLLocationCoordinate2D(latitude: 37.33, longitude: -122.01),
radius: 100
)
await monitor.add(condition, identifier: "ApplePark")
// Await events
for try await event in monitor.events {
switch event.state {
case .satisfied: // User entered region
handleEntry(event.identifier)
case .unsatisfied: // User exited region
handleExit(event.identifier)
case .unknown:
break
@unknown default:
break
}
}
CircularGeographicCondition
CLMonitor.CircularGeographicCondition(
center: CLLocationCoordinate2D,
radius: CLLocationDistance // meters, minimum ~100m effective
)
BeaconIdentityCondition
Three granularity levels:
// All beacons with UUID (any site)
CLMonitor.BeaconIdentityCondition(uuid: myUUID)
// Specific site (UUID + major)
CLMonitor.BeaconIdentityCondition(uuid: myUUID, major: 100)
// Specific beacon (UUID + major + minor)
CLMonitor.BeaconIdentityCondition(uuid: myUUID, major: 100, minor: 5)
Condition Limit
Maximum 20 conditions per app. Prioritize what to monitor. Swap regions dynamically based on user location if needed.
Adding with Assumed State
// If you know initial state
await monitor.add(condition, identifier: "Work", assuming: .unsatisfied)
Core Location will correct if assumption wrong.
Accessing Records
// Get single record
if let record = await monitor.record(for: "ApplePark") {
let condition = record.condition
let lastEvent = record.lastEvent
let state = lastEvent.state
let date = lastEvent.date
}
// Get all identifiers
let allIds = await monitor.identifiers
Event Properties
| Property | Description |
|---|---|
identifier |
String identifier of condition |
state |
.satisfied, .unsatisfied, .unknown |
date |
When state changed |
refinement |
For wildcard beacons, actual UUID/major/minor detected |
conditionLimitExceeded |
Too many conditions (max 20) |
conditionUnsupported |
Condition type not available |
accuracyLimited |
Reduced accuracy prevents monitoring |
Critical Requirements
- One monitor per name — Only one instance with given name at a time
- Always await events — Events only become
lastEventafter handling - Reinitialize on launch — Recreate monitor in
didFinishLaunchingWithOptions
Part 4: CLServiceSession API (iOS 18+)
Declarative authorization—tell Core Location what you need, not what to do.
Basic Usage
// Hold session for duration of feature
let session = CLServiceSession(authorization: .whenInUse)
for try await update in CLLocationUpdate.liveUpdates() {
// Process updates
}
Authorization Requirements
CLServiceSession(authorization: .none) // No auth request
CLServiceSession(authorization: .whenInUse) // Request When In Use
CLServiceSession(authorization: .always) // Request Always (must start in foreground)
Full Accuracy Request
// For features requiring precise location (e.g., navigation)
CLServiceSession(
authorization: .whenInUse,
fullAccuracyPurposeKey: "NavigationPurpose" // Key in Info.plist
)
Requires NSLocationTemporaryUsageDescriptionDictionary in Info.plist.
Implicit Sessions
Iterating CLLocationUpdate.liveUpdates() or CLMonitor.events creates implicit session with .whenInUse goal.
To disable implicit sessions:
<!-- Info.plist -->
<key>NSLocationRequireExplicitServiceSession</key>
<true/>
Session Layering
Don't replace sessions—layer them:
how to use axiom-core-location-refHow to use axiom-core-location-ref on Cursor
AI-first code editor with Composer
1Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add axiom-core-location-ref
2Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
$npx skills add https://github.com/charleswiltgen/axiom --skill axiom-core-location-refThe skills CLI fetches axiom-core-location-ref from GitHub repository charleswiltgen/axiom and configures it for Cursor.
3Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
◆ Which agents do you want to install to?││ ── Universal (.agents/skills) ── always included ────│ • Amp│ • Antigravity│ • Cline│ • Codex│ ●Cursor(selected)│ • Cursor│ • Windsurf4Verify installation
Confirm successful installation by checking the skill directory location:
.cursor/skills/axiom-core-location-refReload or restart Cursor to activate axiom-core-location-ref. Access the skill through slash commands (e.g., /axiom-core-location-ref) or your agent's skill management interface.
⚠Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
Additional Resources
List & Monetize Your Skill
Submit your Claude Code skill and start earning
GET_STARTED →Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
✓Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
✓Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
✓Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
✓Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
general reviewsRatings
4.5★★★★★73 reviews- ★★★★★Kofi Sanchez· Dec 28, 2024
I recommend axiom-core-location-ref for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★William Nasser· Dec 24, 2024
I recommend axiom-core-location-ref for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★James Robinson· Dec 16, 2024
axiom-core-location-ref reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Ishan Ghosh· Dec 12, 2024
axiom-core-location-ref fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Luis Johnson· Dec 12, 2024
Keeps context tight: axiom-core-location-ref is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Kofi Chen· Dec 12, 2024
Solid pick for teams standardizing on skills: axiom-core-location-ref is focused, and the summary matches what you get after install.
- ★★★★★Michael Mehta· Dec 8, 2024
axiom-core-location-ref has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Luis Farah· Dec 4, 2024
Useful defaults in axiom-core-location-ref — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Chinedu Nasser· Nov 19, 2024
Keeps context tight: axiom-core-location-ref is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Sakura Smith· Nov 15, 2024
Keeps context tight: axiom-core-location-ref is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 73
1 / 8