iOS Native
Building native iOS? Check out the iOS native guide.
This guide walks you through setting up a RunnerHub pipeline for Flutter projects. Build, test, and deploy both iOS and Android from a single codebase.
Create .runnerhub/runnerhub.yml in your repository root:
name: Flutter iOS Buildplatform: flutter
environment: flutter: "3.24.0"
triggers: - push - pull_request
steps: - name: Install dependencies run: flutter pub get
- name: Build iOS run: flutter build ios --debugExpand your pipeline to include tests and builds:
name: Flutter Build & Testplatform: flutter
environment: flutter: "3.24.0"
triggers: - push - pull_request
steps: - name: Install dependencies run: flutter pub get
- name: Run tests run: flutter test
- name: Analyze code run: flutter analyze
- name: Build iOS run: flutter build ios --debugTo build for Android, use the flutter build apk command:
name: Flutter Android Buildplatform: flutter
environment: flutter: "3.24.0"
triggers: - push - pull_request
steps: - name: Install dependencies run: flutter pub get
- name: Build APK run: flutter build apk
artifacts: - build/app/outputs/**/*.apkBuild both iOS and Android in a single pipeline:
name: Flutter Mobile Buildplatform: flutter
environment: flutter: "3.24.0"
triggers: - push - pull_request
steps: - name: Install dependencies run: flutter pub get
- name: Run tests run: flutter test
- name: Build iOS run: flutter build ios --debug
- name: Build Android run: flutter build apk
artifacts: - build/app/outputs/**/*.apkRunnerHub automatically caches Flutter and Dart packages. Dart packages are cached (~/.pub-cache) and restored between builds, keyed on pubspec.lock. CocoaPods and npm caches also apply for the iOS side of Flutter builds. Gradle caches apply for the Android side. The Flutter SDK is cached across builds, so subsequent builds download faster. For faster builds, ensure your pubspec.lock is committed to version control so dependency resolution is deterministic.
Run Flutter tests:
- name: Run tests run: flutter testCode analysis:
- name: Analyze code run: flutter analyzeBuild iOS release:
- name: Build iOS Release run: flutter build ios --releaseBuild APK:
- name: Build APK run: flutter build apk --split-per-abiBuild App Bundle (for Play Store):
- name: Build AAB run: flutter build appbundleUse Flutter stable channel:
environment: flutter: stableUse Flutter beta channel:
environment: flutter: betaUse environment variables:
steps: - name: Build run: flutter build ios --debug env: FLUTTER_ENV: productioniOS Native
Building native iOS? Check out the iOS native guide.
React Native
Using React Native instead? See the React Native guide.
Pipeline Reference
Explore all pipeline options in the YAML reference.
Troubleshooting
Hit a problem? Check the troubleshooting guide.