RORK LABJP
BUILD — Rork Max runs real Macs in the cloud loaded with Xcode and the iOS SDK, writing SwiftUI, compiling, reading the errors and building again. That loop, not the code generation, is what lifts the outputNATIVE — What comes out is pure Swift and SwiftUI, not React Native. Reaching AR, Metal graphics and widgets that React Native cannot touch is the real gap between this and other buildersPLATFORMS — Coverage spans iPhone, iPad, Apple Watch, Apple TV and Vision Pro, plus iMessage. Worth a look if you want to start from a watch app or an extension rather than a phone screenCOMPANION — The Rork Companion app lets you check a generated build on a real iPhone without a paid Apple Developer account, lowering the bar for trying a first project end to endPRICING — Free to start, paid plans from $25 a month, and Rork Max on the $200 Max plan. Worth working out up front how many projects it takes to earn that backDEADLINE — From August 31, 2026, Google Play requires target API level 36 or higher for new apps and updates alike. Ten days out, and the targetSdkVersion of what you generate is yours to verifyBUILD — Rork Max runs real Macs in the cloud loaded with Xcode and the iOS SDK, writing SwiftUI, compiling, reading the errors and building again. That loop, not the code generation, is what lifts the outputNATIVE — What comes out is pure Swift and SwiftUI, not React Native. Reaching AR, Metal graphics and widgets that React Native cannot touch is the real gap between this and other buildersPLATFORMS — Coverage spans iPhone, iPad, Apple Watch, Apple TV and Vision Pro, plus iMessage. Worth a look if you want to start from a watch app or an extension rather than a phone screenCOMPANION — The Rork Companion app lets you check a generated build on a real iPhone without a paid Apple Developer account, lowering the bar for trying a first project end to endPRICING — Free to start, paid plans from $25 a month, and Rork Max on the $200 Max plan. Worth working out up front how many projects it takes to earn that backDEADLINE — From August 31, 2026, Google Play requires target API level 36 or higher for new apps and updates alike. Ten days out, and the targetSdkVersion of what you generate is yours to verify
Articles/App Dev
App Dev/2026-06-30Intermediate

Previewing Files In-App in Rork — calling Quick Look safely from Expo

How to preview PDFs, images, and Office documents in place without sending users out of your app, using Quick Look (QLPreviewController) from Rork (Expo). Covers pre-downloading remote files, the local-URL requirement, the Android FileProvider alternative, and handling the share button.

Rork539Expo175Quick Lookfile previewindie developer39

Premium Article

A user taps an invoice PDF they received inside the app, gets bounced out to Safari, and can't find their way back — building apps as an indie developer, I've felt the pain of this "left and never returned" experience. Sending someone away just to view a file breaks the context they were in.

iOS has a mechanism built for exactly this: Quick Look (QLPreviewController). It opens PDFs, images, text, CSV, and Office documents like Word and Excel as a full-screen preview inside your app. A standard Rork app is generated as React Native (Expo), so you call this native Quick Look through a thin bridge module. The crux of the design was knowing precisely what you can and can't hand it.

What Quick Look can and can't open

First, the premise. Quick Look is a local file preview mechanism. Getting this wrong is how the first implementation stumbles.

  • It opens local file URLs (paths starting with file://)
  • Passing an https:// remote URL directly won't work. You have to download it locally first
  • Supported formats are broad: PDF, images (JPEG/PNG/HEIC), text, CSV, RTF, iWork, Microsoft Office, USDZ (3D), and more
  • A correct extension is the hint for type detection. With an extensionless name like document.tmp, even genuine PDF content sometimes won't open

What I tripped on first was handing it a signed URL fetched from the server as-is. Quick Look just shows a blank, with no error. Locking in the rule "always cache remote files before opening" from the start is the shortcut.

Cache the remote file first

In Expo, download with expo-file-system and hand the saved local URI to Quick Look. If it's already downloaded, reusing it instead of re-fetching keeps the wait short even for a large PDF.

// downloadForPreview.ts
import * as FileSystem from 'expo-file-system';
 
// Cache a remote URL and return the file:// local path
export async function ensureLocalCopy(remoteUrl: string, filename: string) {
  const target = FileSystem.cacheDirectory + filename;
 
  const info = await FileSystem.getInfoAsync(target);
  if (info.exists) return target; // don't re-download if present
 
  const { uri, status } = await FileSystem.downloadAsync(remoteUrl, target);
  if (status !== 200) {
    throw new Error(`download failed: ${status}`);
  }
  return uri;
}

Always include the correct extension in the filename. If the server doesn't return one, deriving .pdf or .xlsx from the Content-Type yourself keeps Quick Look's type detection stable.

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
You'll be able to let users view PDFs, images, and Office docs inside the app instead of handing them to an external app
You'll see, with working code, why passing a remote URL directly fails and the correct flow of caching first, then opening the local URL
You'll learn the design that folds iOS Quick Look and Android FileProvider+ACTION_VIEW into one call site, plus when to suppress the share button
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

App Dev2026-08-18
The three places I had to fix before a Rork project actually targeted API level 36
My app.json said targetSdkVersion 36. The value my build actually read was 35. Here is the script that reports the effective value, and how I split my apps between raising, leaving alone, and requesting an extension.
App Dev2026-08-16
My chart broke on day one, not at scale
A line chart that vanished for anyone with only a few days of data. The cause was a zero-height Y axis turning coordinates into NaN. Here is the measured behavior and the small normalization layer that fixed it.
App Dev2026-08-06
Deciding overlay text legibility at ingest time instead of on device — four metrics measured side by side
Moving the question of whether text stays readable over a wallpaper out of the device and into the content pipeline. Four candidate metrics measured across 240 images, including what downscaled judging actually computes.
📚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 →