shorebird icon indicating copy to clipboard operation
shorebird copied to clipboard

fix: build iOS failed cocoa pods

Open nicolarigoni opened this issue 8 months ago • 1 comments

App ID: (insert your app ID here)

I'm building the app with this command:

        sh("cd .. && PATH=$PATH:/opt/homebrew/bin shorebird release ios --build-name=#{version_number} --build-number=#{formattedTimestamp} --flutter-version=3.24.1")

if run the same command with flutter release it works.

Warning: CocoaPods is installed but broken. Skipping pod install.
  You appear to have CocoaPods installed but it is not working.
  This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
  This can usually be fixed by re-installing CocoaPods.
For re-installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation

CocoaPods not installed or not in valid state.
Failed to build IPA.
Command: flutter build ipa --release --build-name=1.0.0 --build-number=20250414151251
Reason: Exited with code 1.

Also the .log file doesen't show nothing more. What could be the problem?

nicolarigoni avatar Apr 14 '25 15:04 nicolarigoni

One thing to try is simply flutter build ipa which is the command that shorebird release runs under the covers.

If flutter build ipa builds without issue, then we should investigate further, but it will likely fail with the same message, which seems to indicate that cocoapods is not correctly installed.

flutter doctor might also show you more information.

gem install cocoapods is the typical way to install cocoapods.

eseidel avatar Apr 14 '25 19:04 eseidel