Primary responsibility
Prompts the user for location permission. Used as a gating screen before features that need GPS (maps, geofilters, nearby listings).
Settings
| Setting | Type | Environment | Purpose |
|---|---|---|---|
prompt_title |
text | per-button | Title above the prompt |
prompt_body |
textarea | per-button | Explanation copy (Apple/Google care about this — vague copy gets rejected) |
cta_label |
text | per-button | Button label (e.g., “Allow location”) |
post_grant_target |
select | per-button | Button to navigate to after permission is granted |
style_* |
various | per-button | Colors |
How it ties into iOS / Android
The mobile client uses the prompt_title and prompt_body to show a custom rationale screen before triggering the OS permission prompt. The OS permission prompt itself uses the strings configured in Mobile App Manager → Publish Your App → Permission strings (ios_app_gps_message).
This separation is by design: Apple’s review team rejects builds whose rationale is vague. Use this content class to explain why you need location, then let the OS show the canonical permission UI.
Gotchas
- The OS-level permission prompt is one-shot. If the user declines, you can’t re-prompt — they have to enable it in Settings. Use this content class’s prompt to set expectations before the OS prompt fires.
ios_app_gps_messageis the string Apple shows; this class’sprompt_bodyis your custom rationale. Both should explain the same thing in your own words.- Android handles permissions differently per OS version. Android 6+ uses runtime prompts; older versions grant at install.
Related articles
- Content classes overview
- Content class: Map
- Recipe: Publish your app to iOS and Android
Metadata
| Field | Value |
|---|---|
| Article type | Screen Reference |
| Plugin slug | mam-main |
| Applies to plugin version | 2.1.11+ |
| Category | App Settings Reference |
| Audience | WordPress admin / PHP developer |
| Class name | local_app_enable_location_services_button (frozen) |
| Source file | includes/content-classes/local-app-enable-location-services-content-class.php |
| Last verified | 2026-05-02 |
