Location Push Service Extension. CLLocationPushServiceErrorDomain Code: 1

I'm following Apple guidelines to add the Location Push Service Extension to our app.

I followed these steps:

  • I applied and got approved for Location Push Service Extension.
  • My app already asks the user for "Always" permissions for location updates
  • I added the entitlement key com.apple.developer.location.push = TRUE
  • I added to the project a new Target, and selected Location Push Service Extension from the iOS Application Extension group

I encouter the following issue. When I run the app and call

startMonitoringLocationPushes(completion:)

I receive the following error:

Error Domain=CLLocationPushServiceErrorDomain Code=1 "(null)"

By looking at Apple documentation for CLLocationPushServiceErrorDomain, code 1 stands for:

missingPushExtension An error code that indicates the app is missing a Location Push Service Extension.

As mentioned beofore I already added the Location Service Extension Target to the project. Any idea of why I receive this error?

Thanks

Accepted Answer

After trial and error, I figured out what the issue was. The deployment target of the Location Push Service Extension was set automatically to the latest iOS version (16.4 at the time of this post), but the device where it was built had a previous version of iOS.

I fixed it by changing the General > Deployment Info on the Location Push Service Extension Target to iOS 15.0 (minimum iOS requirement for this feature).

Hello @dobroios can you tell me how long it took you to get approved , and how did you apply for it ? I requested the entitlement for more than a month and no response at all , I have even tried to follow up

Location Push Service Extension. CLLocationPushServiceErrorDomain Code: 1
 
 
Q