Skip to main content
This guide covers building AppFlowy for mobile platforms (iOS and Android) from source.

Prerequisites

Before building, ensure you have completed the development environment setup.
All commands should be run from the frontend/ directory.

iOS Setup

1

Install Xcode

Download and install Xcode from the App Store or developer.apple.com.
2

Install CocoaPods

3

Install cargo-lipo

For building iOS universal libraries:
4

Add iOS targets

Android Setup

1

Install Android Studio

Download from developer.android.com.
2

Install Android SDK

Through Android Studio:
  • SDK Platforms: Android 10+ (API 29+)
  • SDK Tools: NDK, CMake
3

Set environment variables

4

Install cargo-ndk

For building Android libraries:
5

Add Android targets

Building for iOS

Development Build

1

Build Rust backend

For iOS device (ARM64):
For iOS simulator (Apple Silicon):
This command:
  • Compiles Rust as a static library (.a)
  • Uses cargo-lipo for iOS targets
  • Copies the library to appflowy_flutter/packages/appflowy_backend/ios/
2

Install Flutter dependencies

3

Run on simulator or device

Or open in Xcode:

Production Build

1

Build Rust backend (release)

2

Build iOS app

3

Archive and distribute

Open in Xcode:
Then:
  1. Product → Archive
  2. Distribute App
  3. Follow App Store Connect workflow
iOS builds use staticlib (.a) format for compatibility with iOS apps.

Building for Android

Development Build

1

Build Rust backend

For ARM64 devices (most common):
This command:
  • Compiles Rust as a shared library (.so)
  • Uses cargo-ndk to build for Android
  • Copies JNI libs to appflowy_flutter/android/app/src/main/jniLibs/
2

Install Flutter dependencies

3

Run on emulator or device

Production Build

1

Build Rust backend (release)

2

Build Android APK

The APK will be at:
3

Build Android App Bundle (AAB)

For Play Store distribution:
The AAB will be at:
Android builds use cdylib (.so) format as JNI shared libraries.

Multi-Architecture Builds

iOS Universal Library

For supporting multiple iOS architectures:
This creates a universal library that works on both devices and simulators.

Android Multi-ABI

For CI/production builds supporting multiple architectures:
This builds for:
  • arm64-v8a (ARM64) - Modern devices
  • armeabi-v7a (ARMv7) - Older devices
Building for multiple ABIs significantly increases APK/AAB size.

Build Targets

iOS Targets

Android Targets

ARMv7 support may be deprecated in future versions. ARM64 covers 95%+ of active Android devices.

Platform-Specific Configuration

iOS Configuration

Minimum iOS Version: 11.0 In appflowy_flutter/ios/Podfile:
Info.plist Configuration: Ensure proper permissions are set in ios/Runner/Info.plist:

Android Configuration

Minimum Android Version: API 29 (Android 10) In appflowy_flutter/android/app/build.gradle:
Permissions: In android/app/src/main/AndroidManifest.xml:

Device Testing

iOS Simulator

1

List available simulators

2

Launch simulator

3

Run app

iOS Device

1

Connect device

Connect your iPhone/iPad via USB.
2

Trust computer

Unlock device and trust the computer.
3

Configure signing

Open Xcode and configure automatic signing:
Select your team in Signing & Capabilities.
4

Run app

Android Emulator

1

Create AVD

In Android Studio:
  1. Tools → Device Manager
  2. Create Virtual Device
  3. Select a device (e.g., Pixel 6)
  4. Download a system image (Android 10+)
2

Start emulator

3

Run app

Android Device

1

Enable developer options

On your Android device:
  1. Settings → About phone
  2. Tap “Build number” 7 times
2

Enable USB debugging

Settings → Developer options → Enable USB debugging
3

Connect device

Connect via USB and authorize the computer.
4

Verify connection

5

Run app

Troubleshooting

Common mobile build issues and solutions:

iOS Build Fails

If you see stdbool.h file not found when building for simulator:
Then rebuild:

Android Build Fails

Install NDK through Android Studio:
  1. Tools → SDK Manager
  2. SDK Tools tab
  3. Check “NDK (Side by side)”
  4. Apply
Then set environment variable:

Hot Reload & Development

Hot Reload

Flutter’s hot reload works on mobile:
Hot reload only works for Dart code changes. Rust changes require a full rebuild.

Debugging

App Distribution

iOS App Store

1

Configure App Store Connect

  1. Create app in App Store Connect
  2. Configure metadata, screenshots
  3. Set up TestFlight for beta testing
2

Build and archive

Then archive in Xcode:
  1. Open ios/Runner.xcworkspace
  2. Product → Archive
  3. Distribute App → App Store Connect

Google Play Store

1

Create Play Console app

  1. Create app in Google Play Console
  2. Configure store listing
  3. Set up internal testing track
2

Generate signing key

3

Configure signing

Create android/key.properties:
4

Build and upload

Upload build/app/outputs/bundle/release/app-release.aab to Play Console.

Next Steps

Testing

Learn how to run tests

Contributing

Contribute your changes

Building Desktop

Build for desktop platforms

Code Style

Follow coding conventions