◉RORK LABJP
●ARCHIVE — Since 11/22 you can archive a Rork project instead of deleting it, and bring it back from Archived●PLAY FIX — Fixed: Expo apps built for Google Play losing their Rork AI key, which broke AI features●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Check which model your app calls●SPLASH — Expo users report apps stuck on the splash screen after rolling back to an earlier update●NEW — New: Three clues to check before replying to a "stuck on the splash screen" review●2.5 ROUTE — From 12/1, Gemini 2.5 requests reroute to newer models at new rates. 8 days left●ARCHIVE — Since 11/22 you can archive a Rork project instead of deleting it, and bring it back from Archived●PLAY FIX — Fixed: Expo apps built for Google Play losing their Rork AI key, which broke AI features●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Check which model your app calls●SPLASH — Expo users report apps stuck on the splash screen after rolling back to an earlier update●NEW — New: Three clues to check before replying to a "stuck on the splash screen" review●2.5 ROUTE — From 12/1, Gemini 2.5 requests reroute to newer models at new rates. 8 days left
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.

Rork621Expo237Photo LibraryPermissions4Privacy10iOS118

✦ 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 $10 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-10-30
It runs in development but the iOS Release build dies on launch — checking whether a missing scheme is the cause
In an expo-router app, an app.json with no scheme can crash only the iOS Release build at launch. Why Debug and Android survive, the two ways to fix it, how to think about leaving the scheme out on purpose, and a pre-submission check.
⬡ 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.