subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.17k stars 193 forks source link

Error output from CocoaPods #87

Closed HarvsG closed 3 years ago

HarvsG commented 3 years ago

My flutter build fails with CocoaPods,

I am developing on a Linux machine so not sure if I would be able to re-create the error.

     [!] CocoaPods could not find compatible versions for pod "firebase_auth":
      In Podfile:
        firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)

    Specs satisfying the `firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)` dependency were found, but they required a higher minimum deployment target.

..........
     /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
    /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
    /usr/local/lib/ruby/gems/2.7.0/bin/pod:23:in `load'
    /usr/local/lib/ruby/gems/2.7.0/bin/pod:23:in `<main>'

Error output from CocoaPods:
↳

    [!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error: Process completed with exit code 1.

My CI.yaml

name: CI
on:
  push:
    branches:
      - main

jobs:
  flutter_test:
    name: Run flutter test and analyze
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: "12.x"
      - uses: subosito/flutter-action@master
        with:
          channel: "master"
      - run: flutter pub get
      - run: flutter analyze --no-fatal-infos
      - run: flutter test

  build_ios:
    name: Build Flutter (iOS)
    needs: [flutter_test]
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: "12.x"
      - uses: subosito/flutter-action@master
        with:
          channel: "master"
      - run: flutter pub get
      - run: flutter clean
      - run: flutter build ios --release --no-codesign

  build_appbundle:
    name: Build Flutter (Android)
    needs: [flutter_test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: "12.x"
      - uses: subosito/flutter-action@master
        with:
          channel: "master"
      - run: flutter pub get
      - run: flutter clean
      - run: flutter build appbundle
HarvsG commented 3 years ago

Editing all instances of IPHONEOS_DEPLOYMENT_TARGET = 8.0; to IPHONEOS_DEPLOYMENT_TARGET = 11.0; in ios/Runner.xcodeproj/project.pbxproj fixed this for me.