<!--
{
  "documentType" : "article",
  "framework" : "CoreLocation",
  "identifier" : "/documentation/CoreLocation/suspending-authorization-requests",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Suspending authorization requests"
}
-->

# Suspending authorization requests

Defer the system’s authorization request dialog until your app is ready.

## Discussion

If your app has an onboarding flow that includes obtaining location updates, you may want to defer the Core Location’s request for authorization from the user. You can inhibit the auto-prompting in your app by creating a [`CLServiceSession`](/documentation/CoreLocation/CLServiceSession-pt7n) at a convenient time in your app, then iterating over its diagnostics property to determine the level of authorization the person using your app selects. The following code snippet demonstrates how to defer the prompting.

```swift
func doPromptingFlow() async {
    await showHelloPrompt()

    // Obtain a session. This causes Core Location to display the authorization prompt.
    let session = CLServiceSession.session(authorization: .whenInUse)

    // Wait for interaction with the prompot to complete (successfully or with denial).
    for try await diagnostic in session.diagnostics {
        if !diagnostic.authorizationRequestInProgress {
            // A denial occurred.
            break
        }
    }

    await doFurtherWork()
}
```

Add the `CLRequireExplicitServiceSession` property to your app’s Info.plist file to opt into this control behavior.

---

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)