◉RORK LABJP
●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first
Articles/Dev Tools
⬡ Dev Tools/2026-06-29Advanced

Handling iOS Limited Photo Library Access in a Rork (Expo) App

Handle iOS limited photo library access (selected photos only) correctly in a Rork (Expo) app. Covers the three states of full / limited / denied, designing a screen that works from the selected subset, and a path to add more photos, all with working code.

Rork577Expo213Photo LibraryPermissions4Privacy10iOS115

✦ Premium Article

I got a request on a wallpaper app — "I'd like to use my own photos as backgrounds" — and added photo library access. It worked fine on my test device, yet one user reported, "I selected photos but nothing shows up in the app." The cause: at the iOS permission dialog, they had chosen "Select Photos" rather than "Allow Access to All Photos." My app was built assuming full access, reading the whole library, so it could not correctly handle the few photos the user had picked.

iOS limited access (selected photos only) is exactly the option privacy-minded users tend to pick. Using a Rork-generated Expo app, this walkthrough lays out a design that builds limited access in as the assumption, not the exception.

Not "was it granted" but "how much was granted"

Treat the photo permission as a granted boolean and you drop limited access. The iOS photo permission effectively has three states.

StateUser's choiceWhat the app can doCorrect path
Full accessAll PhotosRead the whole libraryNormal grid
Limited accessSelect PhotosRead only the chosen photosShow the selection + an "add more" path
DeniedDon't AllowRead nothingGuide to the Settings app

The pitfall: even limited access succeeds as a permission. Look only at granted === true and you cannot tell full from limited. Try to read the whole library under limited access and only the few chosen photos come back — which, depending on the implementation, looks "empty." Mistake that for denial and you show the user an off-target "please allow in Settings," confusing them.

Receive the three states correctly

Expo's expo-media-library returns information that distinguishes full from limited. Read accessPrivileges (iOS) to decide all / limited / none.

// photos/permission.ts
import * as MediaLibrary from "expo-media-library";
 
export type PhotoAccess = "all" | "limited" | "denied";
 
export async function requestPhotoAccess(): Promise<PhotoAccess> {
  // Pass false for writeOnly to request read permission
  const res = await MediaLibrary.requestPermissionsAsync(false);
  return normalize(res);
}
 
export async function getPhotoAccess(): Promise<PhotoAccess> {
  const res = await MediaLibrary.getPermissionsAsync(false);
  return normalize(res);
}
 
function normalize(res: MediaLibrary.PermissionResponse): PhotoAccess {
  if (res.status !== "granted") return "denied";
  // iOS: accessPrivileges is "limited" under limited access
  // On Android or full-access iOS it is "all" (or undefined)
  const priv = (res as any).accessPrivileges as string | undefined;
  if (priv === "limited") return "limited";
  return "all";
}

The false argument to requestPermissionsAsync(false) means "not write-only" — that is, request read access too. Get this wrong and you cannot read, producing a hard-to-diagnose bug.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Switch to a screen design that works from the selected subset, treating limited access as the assumption rather than full access
✦Receive permission not as a granted boolean but as three states (all / limited / denied), with the right path for each
✦Build a path to re-pick more photos under limited access, and a design that never mistakes an empty selection for a denied permission
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-09-21
A build that stops with exit code 0 — the flag that silenced the log, and the check that let an empty file through
Two reports landed in the same week: eas build --local stopping with exit code 0 but produced no further output, and a zero-byte stub that never got embedded. Both came down to settings that reduce output. Here is how to audit your own scripts.
⬡ Dev Tools2026-09-05
Your Widget Extension Can Submit a BGTaskScheduler Request. It Just Cannot Register the Handler
Calling BGTaskScheduler from a widget extension compiles, submits, and returns true — and then nothing runs. Here is why registration belongs to the host app only, and how I moved refresh ownership back where it belongs across my wallpaper apps.
⬡ Dev Tools2026-07-27
When to Raise Your Minimum iOS Version — Count Leftover Branches, Not User Percentages
Judging a minimum OS bump by usage share produces the same answer every year, so the decision never happens. Here is the annotation convention, the sweep script that counts how many iOS and Android branches each candidate floor would retire, and what to watch for 30 days after.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links