RORK LABJP
MAX — Rork Max builds native Swift apps for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageNATIVE — Rork Max unlocks AR/LiDAR scanning, Metal 3D, widgets, Live Activities, HealthKit, and moreFUNDING — Rork raised $2.8M from a16z, now drawing 743k+ monthly visits at an 85% growth rateRN — Standard Rork generates iOS and Android apps together using React Native (Expo)FOCUS — Rork focuses solely on native mobile apps, setting it apart from web-first Bolt and LovablePRICING — Free to start, paid plans from $25/mo, with Rork Max at $200/mo and two-click App Store publishingMAX — Rork Max builds native Swift apps for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageNATIVE — Rork Max unlocks AR/LiDAR scanning, Metal 3D, widgets, Live Activities, HealthKit, and moreFUNDING — Rork raised $2.8M from a16z, now drawing 743k+ monthly visits at an 85% growth rateRN — Standard Rork generates iOS and Android apps together using React Native (Expo)FOCUS — Rork focuses solely on native mobile apps, setting it apart from web-first Bolt and LovablePRICING — Free to start, paid plans from $25/mo, with Rork Max at $200/mo and two-click App Store publishing
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.

Rork474Expo122Photo LibraryPermissions4Privacy7iOS86

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-05-21
Rork iOS App Rejected with ITMS-90683 on TestFlight — How to Fix Missing Purpose Strings via app.json
If your Rork-built iOS app passes upload but gets an email titled ITMS-90683: Missing Purpose String in Info.plist, this guide walks through the real cause and the permanent fix via app.json, based on 12 years of shipping personal iOS apps with the same problem appearing across new SDK updates.
Dev Tools2026-06-26
Import the User's Own Image From the Files App in a Rork App, Without the URL Going Stale
Pull images from the Files app or iCloud Drive and the URL you picked goes invalid moments later. Here is how expo-document-picker, security-scoped URLs, and a reliable copy into your sandbox actually work, with running code.
Dev Tools2026-06-23
The Private Screen That Lingers in the App Switcher — Hiding the Snapshot iOS Takes the Moment You Background Your App
When you send a React Native app generated by Rork to the background, iOS photographs the current screen for the App Switcher and writes it to disk. Journals and personal input screens linger there in plain sight. This walks through the iOS privacy overlay (why inactive, not background), Android's FLAG_SECURE, scoping it to sensitive screens only, and screenshot detection — all in working code.
📚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
See all →