React Native · Mobile UI at native speed
How do you handle runtime permissions?
Short answer
Declare permissions in the platform manifests, request them at the moment of use, explain why beforehand, and handle denial and permanent denial with a path to settings. Never request everything at launch.
iOS and Android both require declarations, but the mechanics differ. iOS uses Info.plist usage descriptions and shows a system prompt once per permission. Android uses the manifest plus runtime requests for dangerous permissions, and a second denial can make the system stop prompting.
import * as ImagePicker from "expo-image-picker";
export async function pickPhoto() {
const permission = await ImagePicker.requestMediaLibraryPermissionsAsync();
if (!permission.granted) {
return { status: "denied" as const };
}
const result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
quality: 0.8,
});
return result.canceled ? { status: "cancelled" as const } : { status: "ok" as const, assets: result.assets };
}A permission flow that respects users
- Show a short in-app rationale before the system prompt, not after a denial
- Request only the permission needed for the current action
- Handle granted, denied and permanently denied states distinctly
- Offer a settings deep link when the OS will no longer prompt
- Keep the feature usable or gracefully disabled when permission is denied
App review rejects requests for permissions the app does not visibly use, and iOS requires purpose strings that explain the benefit. Some permissions, such as background location or Bluetooth scanning, have additional policy requirements and may need justification.
Follow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1What is the difference between denied and permanently denied?
- 2Where do you declare iOS usage descriptions?
- 3How do you re-check permission after the user returns from Settings?
- 4Why is requesting all permissions at launch a bad idea?
Say it in the interview
I declare only the permissions the app actually uses and request each one at the moment of use, with a short rationale first. I model granted, denied and permanently denied separately, because permanently denied needs a settings path rather than another prompt. I also re-check on foreground since users can change permissions outside the app.
Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.
Related questions
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live React Native mock interview and get scored feedback on depth, clarity and confidence.