---
title: CLLocationPushServiceExtension
framework: corelocation
role: symbol
role_heading: Protocol
path: corelocation/cllocationpushserviceextension
---

# CLLocationPushServiceExtension

The interface you adopt in the type that acts as the main entry point for a Location Push Service Extension.

## Declaration

```swift
protocol CLLocationPushServiceExtension : NSObjectProtocol
```

## Overview

Overview A type that adopts the CLLocationPushServiceExtension protocol acts as the entry point to a Location Push Service Extension. You use this type to respond to incoming location push notifications and perform app-specific tasks. For example, you use it to get someone’s current location and send it to your server. Don’t adopt this protocol in your own custom types. Instead, add a Location Push Service Extension target to your project and modify the type that Xcode provides. To start the delivery of location push notifications, call the startMonitoringLocationPushes(completion:) method to request a unique token from the device. Send that token to your server and use it to generate HTTP requests for APNs to deliver to the device. When the device receives a location push notification that your server generated, the system loads your app extension and calls its didReceiveLocationPushPayload(_:completion:) method. Use that method to configure a CLLocationManager object and request the person’s current location. Collect the location, encrypt it, and send it back to your server using a custom connection. important: In order for your app extension to receive push notifications, the app that contains the app extension must have Always authorization for location services. For information about how to request this access, see Requesting authorization to use location services. Location Push Service Extensions aren’t supported in visionOS. If a compatible iPad or iPhone app contains an app extension of this type, the system doesn’t load it. For more information about adding the extension to your app, see Creating a location push service extension. For information about how to generate push notifications from your server, see Setting up a remote notification server.

## Topics

### Getting the push notification payload

- [didReceiveLocationPushPayload(_:completion:)](corelocation/cllocationpushserviceextension/didreceivelocationpushpayload(_:completion:).md)

### Handling the extension termination

- [serviceExtensionWillTerminate()](corelocation/cllocationpushserviceextension/serviceextensionwillterminate().md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Location push service extension

- [Location Push Service Extension](bundleresources/entitlements/com.apple.developer.location.push.md)
- [CLLocationPushServiceError](corelocation/cllocationpushserviceerror-swift.struct.md)
- [CLLocationPushServiceErrorDomain](corelocation/cllocationpushserviceerrordomain.md)
- [CLLocationPushServiceError.Code](corelocation/cllocationpushserviceerror-swift.struct/code.md)
