I'm following Apple guidelines to add the Location Push Service Extension to my app.
I followed these steps:
Now I encouter the following issue. When I run the app and call this function
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?
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).