I am building a Swift Playgrounds App project on iPad running iPadOS 26.0.1 using the latest version of Swift Playgrounds. I need to access Core Location for a plant location logging app.
What I have done:
• Created an App project (not a Playground) in Swift Playgrounds
• Enabled ‘Core Location When in Use’ in the app capabilities (accessed by tapping the app name)
• Implemented a CLLocationManager with CLLocationManagerDelegate
• Called manager.requestWhenInUseAuthorization() from .onAppear in a SwiftUI view
• Called manager.startUpdatingLocation() immediately after
The problem:
The location permission prompt never appears when the app runs. The app does not appear in Settings → Privacy & Security → Location Services at all. There are no error messages or crashes — the app simply never requests location access.
What I have ruled out:
• The capability IS enabled in Swift Playgrounds app settings
• The app runs without errors otherwise
• This is an App project, not a classic Playground, so it should support capabilities
Questions:
1. Is CLLocationManager with requestWhenInUseAuthorization() supported in Swift Playgrounds App projects on iPadOS 26?
2. Has the location authorization API changed in iPadOS 26 in a way that affects Swift Playgrounds?
3. Is there a working code example for Core Location in a Swift Playgrounds App project on iPadOS 26?
Any guidance would be greatly appreciated.
Topic:
Developer Tools & Services
SubTopic:
Swift Playground
1
0
109