What is the payload for Location push extension?

We have followed the guideline for Location push extension per documentation, however we're getting the following error response:

Response:

* Connection state changed (MAX_CONCURRENT_STREAMS == 1000)!

* We are completely uploaded and fine

< HTTP/2 400 

< apns-id: xxxxxx

< 

* Connection #0 to host api.development.push.apple.com left intact

{"reason":"DeviceTokenNotForTopic"}* Closing connection 0

Request:

curl -v \
-d '{"aps":{"alert":"Testing.. (0)","badge":1,"sound":"default"}}' \
-H "apns-topic: ***.location-query" \
-H "apns-push-type: location" \
-H "apns-priority: 10" \
--http2 \
--cert-type P12 --cert ~/Desktop/push_cert/push_p12.p12 \
https://api.development.push.apple.com/3/device/xxxxxxx

Documentation: https://developer.apple.com/documentation/corelocation/cllocationmanager/creating_a_location_push_service_extension

There's no documentation about the json payload, It would be great if someone can clarify what could be the issue

The error "DeviceTokenNotForTopic" is not due to the payload, but the token you are using is incorrect. Please make sure you are not using a regular APNs token but the one you received by calling  startMonitoringLocationPushes(completion:).

Also, as you are using a certificate based authentication, do make sure that you have obtained a new APNs push certificate that includes permission for location-query, but not one that you may have generated before location-query was being included in the certificates.

class LocationHelper{

    var locationManager:CLLocationManager

    

    init(){

        locationManager = CLLocationManager()

        

        

        locationManager.startMonitoringLocationPushes(completion: onMonitorUpdated)

    }

    func request(){

        let status = locationManager.authorizationStatus

        print(status == .authorizedAlways)

        locationManager.requestAlwaysAuthorization()

        

    }

    

    func onMonitorUpdated(data:Data?, error:Error?){

        print(" error:\(error?.localizedDescription)")

        guard let data = data else {

            return

        }

        let token = data.reduce("", {$0 + String(format: "%02X", $1)})

        

        print("token is:\(token)")

    }

    

}

The Location Push Service Extension only supports token based authentication with APNS.

What is the payload for Location push extension?
 
 
Q