Permission PrimerNew
Explain-then-ask for notifications, location, the camera or photos, then answer what iOS says: granted, or Open Settings.
Pro pattern · recorded from Pro
The SwiftUI source comes with SwiftPieces Pro.
Every Pro pattern installs with one command once your license is signed in, and re-skins with Pro's design system.
Open it in the Pro library ↗Needs a SwiftPieces Pro license: npx swiftpieces login first.
- Type
- PermissionPrimer
- Inside
- Reason and benefits, Alert preview, Real permission request, Open Settings when denied
- Install, with a Pro license
- npx swiftpieces add PermissionPrimer
- Depends on
- Pro's Design System, which installs with it
A primer shown before a system permission prompt. It explains why the app needs the permission, lists what it makes possible, draws the alert iOS will show next, then requests the real permission. Granted turns to a check and calls back; denied explains where to change it and offers Open Settings, and turns granted when the person comes back having allowed it.
Its SwiftUI source comes with SwiftPieces Pro: Permission Primer in the Pro library.