Skip to content

feat(ios): add location permission row and enable background updates#99235

Closed
joelnishanth wants to merge 2 commits into
openclaw:mainfrom
joelnishanth:feat/ios-always-allow-location
Closed

feat(ios): add location permission row and enable background updates#99235
joelnishanth wants to merge 2 commits into
openclaw:mainfrom
joelnishanth:feat/ios-always-allow-location

Conversation

@joelnishanth

@joelnishanth joelnishanth commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #99229

What Problem This Solves

Users selecting "Always" location mode in the OpenClaw iOS app have no visibility into their current iOS-level location permission, and no easy way to upgrade from "While Using" to "Always" without leaving the app. Additionally, allowsBackgroundLocationUpdates was not set on the CLLocationManager, which meant the system would not reliably deliver significant-location events after the app was suspended — even though UIBackgroundModes includes location.

Why This Change Was Made

A user reported that location-based automations are unreliable. The root causes are:

  1. No location row in Privacy & Access — Contacts, Calendar, and Reminders each have a permission row with status + action button, but Location was missing. Users had no quick way to see or change their OS permission level.

  2. Missing allowsBackgroundLocationUpdates — Apple requires this property to be true on the CLLocationManager when the app declares the location background mode, otherwise the system may not deliver location updates after suspension.

User Impact

  • Settings → Privacy now shows a Location permission row at the top, displaying the current OS status (Always / While Using / Not Set / Not Allowed) with an appropriate action button ("Upgrade to Always" or "Open Settings")
  • "While Using" shows as a warning tone to nudge users toward "Always" for reliable background automations
  • Background location monitoring is now properly activated via allowsBackgroundLocationUpdates = true

Evidence

  • Build succeeds on iPhone 17 Pro simulator (iOS 26.3)
  • SwiftFormat passes with zero violations in changed files
  • Verified location row appears in Privacy & Access disclosure group
  • Verified allowsBackgroundLocationUpdates is set before startMonitoringSignificantLocationChanges()

Joel Nishanth · offlyn.AI

joelnishanth and others added 2 commits July 2, 2026 13:59
Add OpenClaw design system foundations:
- Custom typography tokens (OpenClawType) using Plus Jakarta Sans,
  DM Sans, and JetBrains Mono with Dynamic Type scaling
- Spacing and radius token enums (OpenClawSpacing, OpenClawRadius)
- Additive brand color tokens (accentPressed, teal, void, obsidian,
  slate, textPrimary, textSecondary)
- Shared components: OpenClawToggleIndicator, OpenClawStatusBadge,
  OpenClawPrimaryButtonStyle, OpenClawSecondaryButtonStyle
- Bundled font files with OFL license provenance

Migrate all iOS views to OpenClawType tokens. No behavioral, navigation,
or routing changes — this is purely visual/typographic.

Co-authored-by: Cursor <[email protected]>
- Add Location row to Privacy & Access section showing current
  OS authorization (Always / While Using / Not Set / Not Allowed)
  with an action button to upgrade or open Settings
- Enable allowsBackgroundLocationUpdates on the CLLocationManager
  when starting significant-change monitoring so the system
  delivers location events after the app is suspended
- Treat "While Using" as a warning tone in the permission UI
  to nudge users toward Always for reliable automations

Co-authored-by: Cursor <[email protected]>
@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw.

Close: the location idea is useful, but this branch is not a viable landing candidate because it mixes a privacy-sensitive background-location posture change with a broad unrelated typography/font migration and still lacks maintainer product/security approval or real behavior proof.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #99229
Summary: This PR is an attempted fix candidate for the open iOS Always-location permission-flow issue, and it partially overlaps the older background-mode posture issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome.

Review details

Best possible solution:

Close this branch and invite a narrow replacement after maintainer direction on #99229 and #86217; typography/font work should be a separate design PR if maintainers want it.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a feature PR. Source inspection confirms the branch changes the iOS permission and background-location surfaces, but no after-fix real runtime proof is attached.

Is this the best way to solve the issue?

No. The narrow maintainable path is an owner-approved location posture PR with tests/proof, not a privacy-sensitive capability change bundled with unrelated design-system and font assets.

Security review:

Security review needs attention: The diff enables a sensitive iOS background-location capability and adds third-party binary font assets without separating the security/privacy review surface.

  • [medium] Background location needs explicit approval — apps/ios/project.yml:154
    Adding UIBackgroundModes=location changes whether the app declares background access to user location data, while the linked posture issue is still open.
    Confidence: 0.9
  • [low] Unrelated bundled font binaries expand review surface — apps/ios/Sources/Fonts/LICENSE:1
    The PR adds multiple third-party TTF files as app resources in the same branch as a sensitive location change, so supply-chain and licensing review should be split from the permission work.
    Confidence: 0.82

AGENTS.md: found and applied where relevant.

What I checked:

  • PR scope is broader than the stated location fix: Live PR metadata shows 2 commits: one location commit and one unrelated branded typography design-system commit that adds font files, typography tokens, and broad UI rewrites. (8189ccc537b2)
  • Background location capability is flipped by the PR: The PR adds location to the generated iOS UIBackgroundModes list, changing the app bundle's background-location posture. (apps/ios/project.yml:154, 8189ccc537b2)
  • Existing canonical product/privacy issue remains open: The linked issue remains open and frames Always/background location as a maintainer product/privacy decision, with explicit acceptance criteria around the permission flow, effective OS status, plist posture, and tests.
  • Lower-level background-mode posture issue remains open: The related background-mode issue remains open and says adding UIBackgroundModes=location is only one side of a product/privacy choice; the alternative is to remove or soften background-location claims and runtime behavior.
  • Location row does not request unset permission: The new Privacy & Access row sends .notDetermined users to Settings instead of requesting location access through the existing app permission path. (apps/ios/Sources/Settings/PrivacyAccessSectionView.swift:112, 8189ccc537b2)
  • Current main already has Always-gated runtime paths: Current main rejects background location.get unless the app mode is Always and the OS grant is authorizedAlways, which matches the linked issue's source-level context. (apps/ios/Sources/Model/NodeAppModel.swift:1089, 968aa51b8000)

Likely related people:

  • steipete: GitHub commit metadata shows e1dd764504b1 added node location support across the iOS location service, NodeAppModel, and plist surfaces. (role: introduced location behavior; confidence: high; commits: e1dd764504b1; files: apps/ios/Sources/Location/LocationService.swift, apps/ios/Sources/Model/NodeAppModel.swift, apps/ios/Sources/Info.plist)
  • ngutman: Commit 5a39e13c929c restored the significant-location monitor path and touched nearby iOS location/plist surfaces. (role: recent iOS location contributor; confidence: high; commits: 5a39e13c929c; files: apps/ios/Sources/Location/SignificantLocationMonitor.swift, apps/ios/Sources/Location/LocationService.swift, apps/ios/Sources/Info.plist)
  • mbelinky: Commit e98ccc8e17a4 changed iOS background wake/reconnect behavior and touched the README, plist, significant-location monitor, and NodeAppModel paths implicated here. (role: background wake contributor; confidence: high; commits: e98ccc8e17a4; files: apps/ios/README.md, apps/ios/Sources/Info.plist, apps/ios/Sources/Location/SignificantLocationMonitor.swift)

Codex review notes: model internal, reasoning high; reviewed against 968aa51b8000.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 2, 2026
@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS Location Always needs explicit permission flow and use-case contract

1 participant