CLMonitor API Missing Geofence Entry Events After Initial Registration

We are experiencing a failure in CLMonitor event delivery when the application is launched into the background via an APNS (Remote Push Notification).

Even when a CLBackgroundActivitySession is instantiated immediately upon background launch, CLCircularGeographicCondition "Enter" events are suppressed. The system fails to deliver these events until the user manually brings the application to the Foreground. This indicates that CLBackgroundActivitySession does not correctly maintain background persistence when the session begins in a background state rather than transitioning from the foreground.

Comparison of API Behavior (Background State) Launch via APNS:

CLMonitor: Fails to trigger "Enter" events until the app is manually brought to the foreground.

Legacy API: Successfully triggers and delivers "Enter" events immediately upon background launch.

Exit Event Reliability:

CLMonitor: Reliably triggers exit events even in the background.

Legacy API: Reliably triggers exit events.

Foreground Dependency:

CLMonitor: Requires a foreground transition to "flush" or activate the delivery of pending entry events.

Legacy API: No foreground transition required; events are delivered directly to the background process.

Event Recovery:

CLMonitor: Relies on the developer re-instantiating the CLMonitor and awaiting the events stream, which appears to "stall" during warm-starts.

Legacy API: Relies on the CLLocationManagerDelegate which remains active as long as the manager instance exists.

Steps to Reproduce Preconditions:

Location Permissions: Set to "Always Allow".

Background Modes: "Location updates" and "Remote notifications" enabled.

App State: Terminated or Killed (by the user or the OS).

Reproduction Path:

Trigger Background Launch: Send a silent push notification (APNS) to wake the app in the background.

Initialize Session: Within the background launch sequence (e.g., didFinishLaunchingWithOptions), immediately create and hold a strong reference to a CLBackgroundActivitySession.

Register Monitor: * Initialize CLMonitor using requestMonitorWithConfiguration.

Add a geofence using addConditionForMonitoring with a CLCircularGeographicCondition.

Simulate Entry: Move the physical device (or simulate location) into the geofence boundary while the app remains in the background state.

Observe: No "Enter" event is received in the CLMonitor event stream.

Foreground Transition: Bring the app to the foreground.

Actual Result: The "Enter" event is only delivered the moment the app enters the Foreground.

Expected Result: The CLBackgroundActivitySession should enable CLMonitor to deliver "Enter" events immediately in the background, parity with the deprecated startMonitoringForRegion API.

CLMonitor API Missing Geofence Entry Events After Initial Registration
 
 
Q