Xcode Cloud not building my Flutter Project

0 votes

I'm encountering a problem when building my Flutter application using Xcode Cloud. During the build process, I get the following error:

 Command PhaseScriptExecution failed with a nonzero exit code 

To provide more context, this is the content of my ci_post_clone.sh file:


    # The default execution directory of this script is the ci_scripts directory.
    cd $CI_WORKSPACE # change working directory to the root of your cloned repo.
    # Install Flutter using git.
    git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
    export PATH="$PATH:$HOME/flutter/bin"
    # Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
    flutter precache --ios
    # Install Flutter dependencies.
    flutter pub get
    # Install CocoaPods using Homebrew.
    HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
    brew install cocoapods
    # Install CocoaPods dependencies.
    cd ios 
    pod install # run `pod install` in the `ios` directory.
    exit 0

I followed the steps of https://docs.flutter.dev/deployment/cd#xcode-cloud and added all the necessary parts.

I've tried searching for solutions to this issue but couldn't find any helpful information. Can anyone provide guidance on how to resolve this error?

Apr 11, 2023 in Flutter by Ashwini
• 5,430 points

1 answer to this question.

0 votes

It's difficult to determine the exact cause of the error without additional information, but here are a few suggestions that might help you resolve the issue:

  1. Check the Xcode Cloud logs: Xcode Cloud provides detailed logs of the build process. You can access them by clicking on the "Build logs" button on the top right corner of the Xcode Cloud console. Look for any error messages or warnings that might give you a clue about what went wrong.

  2. Check if there are any missing dependencies: Make sure that you have installed all the necessary dependencies for your Flutter project. Check your pubspec.yaml file and ensure that all dependencies are specified correctly.

  3. Check if there are any conflicts between Flutter and Xcode: Make sure that you are using compatible versions of Flutter and Xcode. Check the Flutter documentation to see which versions of Xcode are supported.

  4. Try cleaning and building the project again: Sometimes, cleaning the build directory and rebuilding the project can resolve build issues. In Xcode, go to Product > Clean Build Folder and then try building the project again.

  5. Check if there are any build scripts that are causing issues: Make sure that your build scripts are configured correctly. Check the Xcode Cloud documentation to ensure that your build scripts are compatible with Xcode Cloud.

If none of the above suggestions help, consider reaching out to the Flutter community forums or Xcode Cloud support for additional assistance.

To know more, join our Flutter Development Course today.

answered Apr 11, 2023 by Anitha

Related Questions In Flutter

0 votes
1 answer
0 votes
1 answer

Linking 3 Flutter Projects in One Flutter Project

Yes, it is possible to combine multiple ...READ MORE

answered Mar 20, 2023 in Flutter by vinayak
0 votes
1 answer

How to change flutter project name and id?

Yes, it is possible to change the ...READ MORE

answered Mar 20, 2023 in Flutter by pooja
0 votes
1 answer

How to change Android minSdkVersion in Flutter Project?

Yes, you can change the minSdkVersion in ...READ MORE

answered Mar 21, 2023 in Flutter by Tej
0 votes
1 answer

Why is applicationWillTerminate not being called on the first launch of my app?

The applicationWillTerminate method is called by the ...READ MORE

answered Mar 18, 2023 in Android by vishalini
0 votes
1 answer

How to fix an invalid CFBundleVersion error?

Yes, the error message suggests that the ...READ MORE

answered Apr 6, 2023 in Flutter by pooja
0 votes
1 answer

flutter app not running on ios simulator after adding firebase notification

The error message you provided seems to ...READ MORE

answered Apr 10, 2023 in Flutter by vishalini
+2 votes
2 answers

how to set different provisioning profiles for different targets using Xcode Build

For multiple targets, each task has to ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by ajs3033
• 7,300 points

edited Oct 16, 2018 by Kalgi 4,446 views
0 votes
1 answer

Flutter command not found

This error message usually appears when the ...READ MORE

answered Mar 29, 2023 in Flutter by vishalini
0 votes
1 answer

Flutter Http line not getting executed

The issue might be related to the ...READ MORE

answered Apr 12, 2023 in Flutter by pooja
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP