Actions and permissions
Connect screen actions to permission requests, paywalls, sign-up, and your app logic.
How actions work#
next and complete are handled by the SDK. Other action identifiers are passed to onAction(action, screen, details); your app owns the native request or navigation. The flow schema contains identifiers, never executable app code.
Common actions#
| Action | App behavior | Typical dependency |
|---|---|---|
requestNotifications | Request push notification permission. | Your push provider |
requestTracking | Request App Tracking Transparency. | expo-tracking-transparency |
requestLocation | Request foreground location. | expo-location |
requestCamera, requestPhotos, requestMicrophone, requestContacts | Request the corresponding device access. | Expo modules for each permission |
requestBiometrics | Run a biometric check or enable unlock. | expo-local-authentication |
requestReview | Ask the store to show its review prompt. | expo-store-review |
showPaywall | Present your app’s paywall. | Your billing provider |
signUp | Present your sign-up flow, then resolve whether onboarding continues. | Your auth provider |
custom:name | Run app-specific behavior. | Your code |
Handle actions#
Return nothing or true to let the flow continue immediately. Return a Promise to keep the action button busy until the native or app flow finishes. Resolve to false or reject to keep the person on the current screen.
onAction={async (action, screen, { answers, variables }) => {
if (action === 'requestNotifications') {
await Notifications.requestPermissionsAsync();
return true;
}
if (action === 'showPaywall') {
await presentPaywall();
return true;
}
if (action === 'signUp') {
const user = await presentSignUp();
if (!user) return false; // Keep the person on this screen.
await saveProfile(user.id, variables);
return true;
}
}}Permission timing#
The SDK does not request native permissions by itself. Choose the screen action and connect it to your app’s permission API. Add the required iOS usage description and Expo config plugin settings before building. In the browser preview, native permissions are intentionally not triggered.