Skip to content

fix(ios): restore missing location monitor merge files#18260

Merged
ngutman merged 3 commits intomainfrom
fix/ios-restore-location-monitor
Feb 16, 2026
Merged

fix(ios): restore missing location monitor merge files#18260
ngutman merged 3 commits intomainfrom
fix/ios-restore-location-monitor

Conversation

@ngutman
Copy link
Contributor

@ngutman ngutman commented Feb 16, 2026

Summary

  • Problem: NodeAppModel referenced SignificantLocationMonitor.startIfNeeded(...), but merge to main missed the corresponding iOS location monitor files/protocol methods.
  • Why it matters: pnpm ios:build failed with cannot find 'SignificantLocationMonitor' in scope.
  • What changed: restored iOS location monitor implementation and protocol surface from ios-new-alpha-core, plus the Info.plist ATS key used there.
  • What did NOT change (scope boundary): no changes to Android/macOS logic, no dependency updates.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #

User-visible / Behavior Changes

  • iOS build is restored for the missing location monitor merge case.
  • iOS Info.plist ATS key now uses NSAllowsArbitraryLoadsInWebContent (as in ios-new-alpha-core).

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local Xcode toolchain
  • Model/provider: N/A
  • Integration/channel (if any): iOS app
  • Relevant config (redacted): default iOS simulator destination

Steps

  1. Check out branch.
  2. Run pnpm ios:build.

Expected

  • Build completes successfully.

Actual

  • Build completes successfully (** BUILD SUCCEEDED **).

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: restored files from ios-new-alpha-core, rebuilt iOS app.
  • Edge cases checked: confirmed build succeeds after adding @MainActor to StatusActivityBuilder.build under Swift 6 actor isolation.
  • What you did not verify: runtime behavior on physical iOS device.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: revert this PR.
  • Files/config to restore:
    • apps/ios/Sources/Info.plist
    • apps/ios/Sources/Location/LocationService.swift
    • apps/ios/Sources/Location/SignificantLocationMonitor.swift
    • apps/ios/Sources/Services/NodeServiceProtocols.swift
    • apps/ios/Sources/Status/StatusActivityBuilder.swift
  • Known bad symptoms reviewers should watch for:
    • iOS compile failure referencing SignificantLocationMonitor
    • actor isolation compile errors in StatusActivityBuilder

Risks and Mitigations

  • Risk: restoring ATS key behavior may differ from local-network-only setting.
    • Mitigation: matches existing ios-new-alpha-core behavior and is scoped to iOS Info.plist only.

Greptile Summary

This PR restores iOS location monitor files (SignificantLocationMonitor.swift) and protocol methods that were missing after a merge to main, fixing the build failure. The implementation adds location monitoring functionality to track significant location changes and push events to the gateway for severance hook processing.

Key changes:

  • restored SignificantLocationMonitor enum with startIfNeeded() method referenced by NodeAppModel
  • added protocol methods in LocationServicing for location streaming and significant change monitoring
  • extended LocationService with callback-based and stream-based location monitoring
  • changed Info.plist ATS key from NSAllowsLocalNetworking to NSAllowsArbitraryLoadsInWebContent to match ios-new-alpha-core
  • marked StatusActivityBuilder.build as @MainActor to satisfy Swift 6 actor isolation

The restored implementation appears to match the original from ios-new-alpha-core. One logic issue was identified where stopping location stream updates could interfere with callback-based significant change monitoring when both are active simultaneously.

Confidence Score: 4/5

  • This PR is safe to merge with one logic issue that should be addressed
  • The PR successfully restores missing files from a merge and fixes the build. The implementation is straightforward file restoration from ios-new-alpha-core. Score reduced from 5 to 4 due to a state management issue in LocationService.stopLocationUpdates() where stopping stream updates could inadvertently stop callback-based significant change monitoring when both mechanisms are active
  • Pay attention to apps/ios/Sources/Location/LocationService.swift for the state management fix in stopLocationUpdates()

Last reviewed commit: 9c0974a

@openclaw-barnacle openclaw-barnacle bot added app: ios App: ios size: S maintainer Maintainer-authored PR labels Feb 16, 2026
@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +138 to +145
func stopLocationUpdates() {
guard self.isStreaming else { return }
self.isStreaming = false
self.manager.stopUpdatingLocation()
self.manager.stopMonitoringSignificantLocationChanges()
self.updatesContinuation?.finish()
self.updatesContinuation = nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling manager.stopMonitoringSignificantLocationChanges() here will also stop significant location monitoring started via startMonitoringSignificantLocationChanges() (line 147-151), even when isMonitoringSignificantChanges is true

Suggested change
func stopLocationUpdates() {
guard self.isStreaming else { return }
self.isStreaming = false
self.manager.stopUpdatingLocation()
self.manager.stopMonitoringSignificantLocationChanges()
self.updatesContinuation?.finish()
self.updatesContinuation = nil
}
func stopLocationUpdates() {
guard self.isStreaming else { return }
self.isStreaming = false
self.manager.stopUpdatingLocation()
if !self.isMonitoringSignificantChanges {
self.manager.stopMonitoringSignificantLocationChanges()
}
self.updatesContinuation?.finish()
self.updatesContinuation = nil
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/ios/Sources/Location/LocationService.swift
Line: 138:145

Comment:
calling `manager.stopMonitoringSignificantLocationChanges()` here will also stop significant location monitoring started via `startMonitoringSignificantLocationChanges()` (line 147-151), even when `isMonitoringSignificantChanges` is true

```suggestion
    func stopLocationUpdates() {
        guard self.isStreaming else { return }
        self.isStreaming = false
        self.manager.stopUpdatingLocation()
        if !self.isMonitoringSignificantChanges {
            self.manager.stopMonitoringSignificantLocationChanges()
        }
        self.updatesContinuation?.finish()
        self.updatesContinuation = nil
    }
```

How can I resolve this? If you propose a fix, please make it concise.

@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

1 similar comment
@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@ngutman ngutman force-pushed the fix/ios-restore-location-monitor branch from 14b688d to f60cd10 Compare February 16, 2026 17:41
@ngutman ngutman merged commit 5a39e13 into main Feb 16, 2026
13 checks passed
@ngutman ngutman deleted the fix/ios-restore-location-monitor branch February 16, 2026 17:41
@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

archerhpagent pushed a commit to howardpark/openclaw that referenced this pull request Feb 18, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: f60cd10
Co-authored-by: ngutman <[email protected]>
Co-authored-by: ngutman <[email protected]>
Reviewed-by: @ngutman
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 1, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: f60cd10
Co-authored-by: ngutman <[email protected]>
Co-authored-by: ngutman <[email protected]>
Reviewed-by: @ngutman

(cherry picked from commit 5a39e13)

# Conflicts:
#	CHANGELOG.md
#	apps/ios/Sources/Info.plist
#	apps/ios/Sources/Status/StatusActivityBuilder.swift
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: f60cd10
Co-authored-by: ngutman <[email protected]>
Co-authored-by: ngutman <[email protected]>
Reviewed-by: @ngutman

(cherry picked from commit 5a39e13)

# Conflicts:
#	CHANGELOG.md
#	apps/ios/Sources/Info.plist
#	apps/ios/Sources/Status/StatusActivityBuilder.swift
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: f60cd10
Co-authored-by: ngutman <[email protected]>
Co-authored-by: ngutman <[email protected]>
Reviewed-by: @ngutman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant