Xcode Cloudでcould not find included file ‘Generated.xcconfig’ in search paths
今回はXcode Cloudで下記のようなエラーが起きたときの対処法についてご紹介していきます。
Runner
1 2 3 |
エラー could not find included file 'Generated.xcconfig' in search paths Release.xcconfig:2 |
ログ
1 2 3 4 5 |
Run xcodebuild archive 10.7秒 Run command: 'xcodebuild archive -workspace /Volumes/workspace/repository/ios/Runner.xcworkspace -scheme Runner -destination generic/platform=iOS -archivePath /Volumes/workspace/build.xcarchive -derivedDataPath /Volumes/workspace/DerivedData -resultBundleVersion 3 -resultBundlePath /Volumes/workspace/resultbundle.xcresult -resultStreamPath /Volumes/workspace/tmp/resultBundleStreame52795ba-52c2-42e5-be23-17a40c9f9ca5.json -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=FBGAS4D8TL COMPILER_INDEX_STORE_ENABLE=NO -hideShellScriptEnvironment' エラー Command exited with non-zero exit-code: 65 |
xcodebuild-archive.logの中身
1 2 3 4 5 6 7 8 9 |
2025-01-17T01:25:09.052899771Z === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release === 2025-01-17T01:25:09.052907880Z /Volumes/workspace/repository/ios/Flutter/Release.xcconfig:2:1: error: could not find included file 'Generated.xcconfig' in search paths (in target 'Runner' from project 'Runner') 2025-01-17T01:25:09.052951141Z note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target 'Runner' from project 'Runner') 2025-01-17T01:25:09.052967157Z note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner') 2025-01-17T01:25:09.052978152Z warning: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner') 2025-01-17T01:25:09.052990661Z note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner') 2025-01-17T01:25:09.052999Z 2025-01-17T01:25:09.053030977Z Result bundle written to path: 2025-01-17T01:25:09.053037640Z /Volumes/workspace/resultbundle.xcresult |
Xcode Cloudでcould not find included file 'Generated.xcconfig’ in search paths
対処法の結論を言うと、ci_post_clone.shをios/ci_scripts/ci_post_clone.shに配置する必要があります。
下記に記載がありますね。
https://docs.flutter.dev/deployment/cd#custom-build-script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#!/bin/sh # Fail this script if any subcommand fails. set -e # The default execution directory of this script is the ci_scripts directory. cd $CI_PRIMARY_REPOSITORY_PATH # 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 |
私は上記の対応を行ったところ、archiveが正常に通るようになり、エラーが消えました。
終わりに
今回はXcode Cloudで冒頭のようなエラーが起きたときの対処法についてご紹介いたしました。
ディスカッション
コメント一覧
まだ、コメントがありません