RORK LABJP
TOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the roundTOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the round
Articles/Dev Tools
Dev Tools/2026-05-05Advanced

Taking a Rork Podcast App to Production — Migrating to expo-audio, Recovering from Interruptions, and Resumable Downloads

Implementation notes for making a Rork podcast app survive real use: migrating off expo-av before SDK 55 removes it, recovering from call interruptions, resuming broken downloads, and budgeting storage against iCloud backup.

podcastbackground audio2expo-audio3expo-av6offline2Rork515React Native209

Premium Article

Building a podcast app sounds simple until you hit the first wall: audio that stops the moment the user locks their screen. I saw this exact issue in TestFlight feedback while building an audio wellness app — users would start playback, put the phone in their pocket, and the audio would stop within seconds. The fix turned out to be a two-line configuration change, but finding those two lines took longer than it should have.

Plan the Architecture Before Writing Code

Before generating any screens, settle on what you're building:

  • Feed management: Add RSS URLs, fetch and display episode lists
  • Playback: Background audio, seek bar, speed control (0.75x to 2x)
  • Downloads: Save episodes for offline listening
  • Lock screen: Show episode info in iOS Control Center and Android media notification

For state management, Zustand works best here. Audio is a natural singleton — any screen needs to access and control the same playback state.

# Install dependencies
npx expo install expo-av expo-file-system expo-media-library
npm install zustand react-native-xml2js date-fns

Type Definitions First

Define your data shapes upfront. This also makes prompting Rork's AI more effective — "use these TypeScript types to generate a screen" produces far more accurate code than open-ended requests.

// types/podcast.ts
 
export interface Episode {
  id: string;
  title: string;
  description: string;
  audioUrl: string;
  pubDate: Date;
  duration: number;     // seconds
  imageUrl?: string;
  localPath?: string;   // set when downloaded to device
}
 
export interface PodcastFeed {
  id: string;
  title: string;
  description: string;
  imageUrl: string;
  rssUrl: string;
  episodes: Episode[];
  lastUpdated: Date;
}
 
export interface PlayerState {
  currentEpisode: Episode | null;
  isPlaying: boolean;
  position: number;     // seconds
  duration: number;     // seconds
  playbackRate: number; // 0.75 / 1.0 / 1.25 / 1.5 / 2.0
}

The Two-Place Background Audio Configuration

The most common support request in audio apps is audio stopping when the screen locks. It always traces back to one of two missing configurations — and you need both.

Configuration 1: app.json

{
  "expo": {
    "plugins": [
      ["expo-av", { "microphonePermission": "Used for recording episode notes" }]
    ],
    "ios": {
      "infoPlist": {
        "UIBackgroundModes": ["audio"]
      }
    }
  }
}

Without UIBackgroundModes: ["audio"], iOS suspends your app's audio session the moment it backgrounds, regardless of any code-level settings. This is the declaration that tells iOS your app is a legitimate audio app.

Configuration 2: Audio Session at Runtime

// hooks/useAudioSession.ts
import { Audio } from 'expo-av';
import { useEffect } from 'react';
 
export function useAudioSession() {
  useEffect(() => {
    const initAudioSession = async () => {
      try {
        await Audio.setAudioModeAsync({
          // iOS: continue audio when app goes to background
          staysActiveInBackground: true,
          // iOS: play even in silent mode
          playsInSilentModeIOS: true,
          allowsRecordingIOS: false,
          // Android: fully stop other audio rather than ducking
          shouldDuckAndroid: false,
          interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
          interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
        });
      } catch (error) {
        // Audio session failure shouldn't crash the app — log and continue
        console.error('Failed to initialize audio session:', error);
      }
    };
 
    initAudioSession();
  }, []);
}

Call this hook exactly once in your root layout (app/_layout.tsx). Calling it before every playback resets the iOS audio session and can cause other apps' audio to unexpectedly resume.

On shouldDuckAndroid: false: setting this to true means a phone call will just lower your volume rather than pausing playback. For podcasts, pausing on interruption is better UX — users want to catch what was said after a call, not miss it.

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
A mapping table for migrating off expo-av before SDK 55 removes it, including the known Android limitation on interruptionMode
Resumable downloads built on resumeData — why file existence is the wrong completion check and how HTTP 206 breaks naive code
Surviving three kinds of interruption (calls, unplugged headphones, storage pressure) plus five one-minute hardware checks
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-06-26
Keep Audio Playing in the Background and Add Lock Screen Controls in a Rork App
How to make a Rork-generated Expo app keep playing music or healing sounds in the background and expose lock screen and Control Center controls, with working expo-audio code and the platform-specific gotchas.
Dev Tools2026-07-15
My Rork sleep timer faded out on time — but the sound didn't
Rork writes sleep-timer fades against the wall clock with setInterval. The numbers say 30 minutes, but the real audio fades early or cuts out abruptly. Here is how to drive the fade from the actual playback position, why a logarithmic curve sounds natural, and the honest limit of JS fades when the screen is locked.
Dev Tools2026-05-13
Three Things I Got Stuck on When Implementing Ambient Sound in a Healing App with Rork
Three common pitfalls when implementing ambient looping audio in meditation and healing apps built with Rork: loop clicks, iOS silent mode, and battery drain — with working expo-av 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 →