I am unable to build the ios component of my Flutter project in release mode, as part of the "deploy" workflow on Bitrise. The "primary" workflow works just fine.
I am able to build and deploy my Flutter project to an iOS emulator locally.
The build log for the deploy workflow failure is below:
+------------------------------------------------------------------------------+
| (7) flutter-build@0 |
+------------------------------------------------------------------------------+
| id: flutter-build |
| version: 0.13.2 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2020-08-26T19:18:25Z |
+------------------------------------------------------------------------------+
| |
Config:
- IOSAdditionalParams: --release --no-codesign
- AndroidAdditionalParams: --release
- Platform: both
- IOSExportPattern: *build/ios/iphoneos/*.app
- AndroidOutputType: apk
- AndroidExportPattern: *build/app/outputs/apk/*/*.apk
*build/app/outputs/bundle/*/*.aab
- IOSCodesignIdentity:
- ProjectLocation: hometastic
- DebugMode: false
- CacheLevel: all
- AndroidBundleExportPattern: *build/app/outputs/bundle/*/*.aab
iOS Codesign settings
- Skipping codesign preparation, --no-codesign parameter set
Build iOS
$ flutter "build" "ios" "--release" "--no-codesign"
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building asterixorobelix.hometastic for device (ios-release)...
Running pod install... 1.0s
CocoaPods' output:
↳
[!] Invalid `Podfile` file: cannot load such file -- /usr/local/flutter/packages/flutter_tools/bin/podhelper.
# from /Users/vagrant/git/hometastic/ios/Podfile:26
# -------------------------------------------
#
> require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
#
# -------------------------------------------
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:301:in `rescue in block in from_ruby'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:295:in `block in from_ruby'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `instance_eval'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `initialize'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `new'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `from_ruby'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:259:in `from_file'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/config.rb:200:in `podfile'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:150:in `verify_podfile_exists!'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:46:in `run'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/Users/vagrant/.rbenv/versions/2.6.3/bin/pod:23:in `load'
/Users/vagrant/.rbenv/versions/2.6.3/bin/pod:23:in `<main>'
Error running pod install
Failed to build iOS platform, error: exit status 1
| |
+---+---------------------------------------------------------------+----------+
| x | flutter-build@0 (exit code: 1) | 18.96 sec|
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...thub.com/bitrise-steplib/bitrise-step-flutter-build/issues |
| Source: https://github.com/bitrise-steplib/bitrise-step-flutter-build |
+---+---------------------------------------------------------------+----------+
It appears that the issue was that my git repo was nested. ie: repo/intermediateFolder/ => when I deleted the intermediary folder and put the source code at the root, the build worked. ie:repo/. In particular the issue seems to be that the build system expected the pubspec.yml to be in the root of the repo.
I am unable to build the ios component of my Flutter project in release mode, as part of the "deploy" workflow on Bitrise. The "primary" workflow works just fine.
I am able to build and deploy my Flutter project to an iOS emulator locally.
The build log for the deploy workflow failure is below:
The failure appears to relate to this issue on StackOverflow
On my machine, I am using Flutter, Channel stable, 1.20.1