Prerequisites
Before building the mobile app, ensure you have:- Node.js 18+
- npm or yarn
- Expo CLI (
npm install -g expo-cli) - Platform-specific tools:
- iOS: macOS with Xcode 14+
- Android: Android Studio with SDK 33+
Project Configuration
The app configuration is defined inraffi-mobile/app.json:
App Identifiers
- iOS Bundle ID:
al.kaleid.mobile - Android Package:
al.kaleid.raffimobile - URL Scheme:
raffi://
Development Build
Start Expo development server
- Scan the QR code with Expo Go app
- Press
ifor iOS simulator - Press
afor Android emulator - Press
wfor web browser
Production Build
Building with Expo Classic Build
Expo provides a cloud build service for creating production apps:Build for iOS
- Archive (
.ipa) for App Store or TestFlight - Simulator build for testing
- Apple Developer account
- Distribution certificate
- Provisioning profile
Building with EAS Build
For more control and faster builds, use EAS (Expo Application Services):iOS Build Configuration
The iOS-specific configuration inapp.json:
iOS Features
- iPad Support: Full tablet optimization
- Picture-in-Picture: Native PiP for video playback
- Network Security: Allows HTTP connections for local streaming servers
- Screen Orientation: Adaptive orientation based on content
Building for iOS Simulator
For testing without a physical device:Building for iOS Device
For TestFlight or App Store distribution:Android Build Configuration
The Android-specific configuration inapp.json:
Android Features
- Adaptive Icons: Material You themed app icons
- Edge-to-Edge Display: Immersive full-screen experience
- Material Design 3: Modern Android UI patterns
Building APK (Direct Install)
raffi-mobile-{version}.apk
Building AAB (Google Play)
raffi-mobile-{version}.aab
Building for Android Emulator
Native Modules
The mobile app includes a custom native module for torrent streaming:Building with Native Modules
When using custom native modules, you must create a development build:Expo Plugins
The app uses several Expo plugins configured inapp.json:
expo-router- File-based routingexpo-screen-orientation- Orientation controlexpo-splash-screen- Custom splash screenexpo-pip- Picture-in-picture support./plugins/withTorrentStreamer.js- Custom torrent module
Build Output Locations
Expo Classic Build
Builds are hosted on Expo’s servers. Download links are provided in the terminal:EAS Build
View and download builds from:Local Builds
When runningexpo run:ios or expo run:android, outputs are located:
- iOS:
raffi-mobile/ios/build/ - Android:
raffi-mobile/android/app/build/outputs/
Environment Configuration
The mobile app requires configuration for the streaming server:App Assets
Required assets for building:- Icon:
assets/images/icon.png(1024x1024) - Splash Screen:
assets/images/splash-icon.png - Android Adaptive Icon:
- Foreground:
assets/images/android-icon-foreground.png - Background:
assets/images/android-icon-background.png - Monochrome:
assets/images/android-icon-monochrome.png
- Foreground:
- Favicon:
assets/images/favicon.png(web)