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 Reply

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).

  • I did this already. Even after I get the same error. What can I do for remove this. Please reply.

  • It started happening again to me and I also had to change it the version to iOS 15.0 the General = "Minimum Deployments" to work. See if that fixes it for you?

  • Yes, it works for me now. Now the extension will awake when notification push received by device. But the method didReceiveLocationPushPayload(_:completion:) not fired. Can you help me please reply.

Replies

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).

  • I did this already. Even after I get the same error. What can I do for remove this. Please reply.

  • It started happening again to me and I also had to change it the version to iOS 15.0 the General = "Minimum Deployments" to work. See if that fixes it for you?

  • Yes, it works for me now. Now the extension will awake when notification push received by device. But the method didReceiveLocationPushPayload(_:completion:) not fired. Can you help me please reply.

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