Skip to content

chore: SPM support for iOS #3

chore: SPM support for iOS

chore: SPM support for iOS #3

Workflow file for this run

name: iOS Build CI (CocoaPods + SPM)
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-ios:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Flutter pub get
run: flutter pub get
# 🧪 Build iOS example using CocoaPods
- name: Build iOS example with CocoaPods
working-directory: example
run: |
echo "=== Building with CocoaPods ==="
cd ios
pod repo update
pod install
cd ..
flutter config --no-enable-swift-package-manager
flutter build ios --no-codesign --verbose
# 🧹 Clean build + prepare for SPM test
- name: Clean and prepare for SPM test
working-directory: example
run: |
echo "=== Cleaning Pods ==="
rm -rf ios/Pods ios/Podfile.lock
flutter clean
# 🧪 Step 7: Build iOS example using Swift Package Manager
- name: Build iOS example with Swift Package Manager
working-directory: example
run: |
echo "=== Building with SPM ==="
flutter config --enable-swift-package-manager
flutter build ios --no-codesign --verbose
# ✅ Step 8: Verify output
- name: Verify build artifacts
run: |
echo "✅ Both CocoaPods and SPM builds succeeded."