bitrise-steplib / bitrise-step-flutter-build

MIT License
7 stars 14 forks source link

Flutter Build step does not work on Xcode 15 #49

Closed smmcdonald closed 5 months ago

smmcdonald commented 1 year ago

Troubleshooting

Useful information

This has been issue has been identified to be related to CocoaPods and is fixed in a more recent version of CocoaPods. It's likely all that is needed to fix this is to update the version of CocoaPods this step uses. https://github.com/CocoaPods/CocoaPods/issues/12012

Issue description

When building Flutter projects on the Xcode 15 stack, the Flutter Build step fails with error: Failed to build iOS app Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

Bitrise info

 Failed to build iOS app
Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead
  

Steps to reproduce

  1. Set the workflow build stack to use M1 Silicon and Xcode 15
  2. Build a Flutter project workflow that uses the flutter-build Bitrise step
EBaglieriSkylabs commented 1 year ago

Same issue

deffs commented 11 months ago

@godrei any updates on this? This is blocking us from using the new Xcode 15 stacks and we don't want to fall too far behind.

deffs commented 11 months ago

@EBaglieriSkylabs looks like Bitrise recommends adding this code to the Podfile to resolve this issue:

image
deffs commented 9 months ago

Any updates on this? Looks like Apple is deprecating Xcode 14 stacks in April.

EBaglieriSkylabs commented 9 months ago

I resolved time ago inserting a script step before "Flutter build" with this content:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully
set -o pipefail
# debug log
set -x

#Cocoapods
export GEM_HOME=$HOME/.gem/ruby/3.2.0
export PATH=$GEM_HOME/bin:$PATH
gem install cocoapods -v 1.14.3 --user-install
Screenshot 2024-02-08 alle 19 49 02

This can cause some issue with cocoapods cached packages, so i disabled any kind of cache in the "Flutter Build" block:

Screenshot 2024-02-08 alle 19 57 05
bitrise-coresteps-bot commented 6 months ago

Hello there, I'm a bot. On behalf of the community I thank you for opening this issue.

To help our human contributors focus on the most relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 90 days, so I marked it as stale.

The community would appreciate if you could check if the issue still persists. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me".

If no comment left within 21 days, this issue will be closed.

bitrise-coresteps-bot commented 5 months ago

I'll close this issue as it doesn't seem to be relevant anymore. We believe an old issue probably has a bunch of context that's no longer relevant, therefore, if the problem still persists, please open a new issue.