<!--
{
  "availability" : [
    "macOS: 10.7.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreLocation",
  "identifier" : "/documentation/CoreLocation/CLLocationManager/purpose",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Location"
    ],
    "preciseIdentifier" : "c:objc(cs)CLLocationManager(py)purpose"
  },
  "title" : "purpose"
}
-->

# purpose

An app-provided string that describes the reason for using location services.

```
var purpose: String? { get set }
```

## Discussion

If this property isn’t `nil` and the system needs to ask for the user’s consent to use location services, it displays the provided string. You can use this string to explain why your app is using location services.

You must set the value of this property prior to starting any location services. Because the string is ultimately displayed to the user, you should always load it from a localized strings file.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)