Reputation: 9
We are currently building an iOS app with CI/CD from Github Action.
Our project incorporates Watch and widget extensions into an iOS app!
It is possible to build and archive from XCode.
However, when I run the following command in Github Action to build, I get an error.
xcodebuild -project “Project.xcodeproj” -scheme “${{ matrix.scheme }}” -sdk iphonesimulator -destination 'platform=iOS Simulator, name=iPhone 14,OS name=iPhone 14,OS=latest' clean build -verbose
The following build command failed: ` CompileAssetCatalogV
CompileAssetCatalogVariant thinned out /Users/runner/Library/Developer/Xcode/DerivedData/Project-bbxdduymmzeemvgztykqihaxymvx/Build/.Products/Debug-iphonesimulator/ProjectWatch.app /Users/runner/work/Project/ProjectWatch/Preview Contents/Preview Assets.xcassets / Users/runner/work/CowManagement/Project/ProjectWatch/Assets.xcassets (in target 'ProjectWatch' from project 'Project ').
build:
runs-on: macos-latest
strategy:
matrix:
scheme: [Project]
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Set up Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "5.10"
- name: Cache Swift dependencies
uses: actions/cache@v3
with:
path: ~/.swiftpm
key: swiftpm-${{ matrix.scheme }}
restore-keys: |
swiftpm-
- name: Build for ${{ matrix.scheme }}
run: |
xcodebuild -project "Project.xcodeproj" -scheme "${{ matrix.scheme }}" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14,OS=latest' clean build -verbose
Run xcodebuild from the GitHub action. Confirm that the build runs without problems.
Other things checked Check that there is an Assets folder in the project. AppIcon should be set. Make sure that the archive from XCode and the upload from TestFlight are working properly. After uploading, Apple's review must be completed without any problems.
Upvotes: 0
Views: 95