如何解决在 Codemagic iOS 本机中构建 .ipa 失败
我正在尝试在 codemagic 中构建 .ipa 文件,但失败并显示以下消息
存档 执行“xcodebuild -project .-scheme Optivio -archivePath build/ios/xcarchive/_ijalmu93.xcarchive archive COMPILER_INDEX_STORE_ENABLE=NO”
存档失败。
构建失败:|步骤 7 脚本 Build .ipa
退出,状态代码为 66
xcode-project build-ipa --project "$XCODE_PROJECT" --scheme "$XCODE_SCHEME"
我没有工作区,只有项目。当 Xcode 中的存档成功时。
我的完整 yaml 文件如下,
workflows:
ios-testApp:
name: ios_testApp
environment:
vars:
XCODE_PROJECT:: “TestApp.xcodeproj" # <-- Put the name of your workspace here.
XCODE_SCHEME: "TestApp" # <-- Put the name of your scheme here.
# Set up env vars for manual codesigning (See - https://docs.codemagic.io/code-signing-yaml/signing-ios/)
CM_CERTIFICATE: Encrypted(…….) # <-- Put your encrypted distribution certificate here.
CM_CERTIFICATE_PASSWORD: Encrypted(…….) # <-- Put your encrypted distribution certificate password here.
CM_PROVISIONING_PROFILE: Encrypted(…….) # <-- Put your encrypted provisioning profile here.
xcode: 12.4
cocoapods: default
triggering:
events:
- push
- tag
- pull_request
branch_patterns:
- pattern: 'master'
include: true
source: true
scripts:
- name: Initialize keychain to be used for codesigning using Codemagic CLI 'keychain' command
script: |
keychain initialize
- name: set up provisioning profiles
script: |
PROFILES_HOME="/Users/vadivel/Library/MobileDevice/Provisioning Profiles"
mkdir -p "$PROFILES_HOME"
PROFILE_PATH="$(mktemp "$PROFILES_HOME"/$(uuidgen).mobileprovision)"
echo ${CM_PROVISIONING_PROFILE} | base64 --decode > $PROFILE_PATH
echo "Saved provisioning profile $PROFILE_PATH"
- name: Add signing certificate to keychain
script: |
echo $CM_CERTIFICATE | base64 --decode > /tmp/certificate.p12
keychain add-certificates --certificate /tmp/certificate.p12 --certificate-password $CM_CERTIFICATE_PASSWORD
- name: Set up code signing settings on Xcode project
script: |
xcode-project use-profiles
- name: Build .ipa
script: |
xcode-project build-ipa --project "$XCODE_PROJECT" --scheme "$XCODE_SCHEME"
artifacts:
- build/ios/ipa/*.ipa
- /Users/vadivel/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM
publishing:
email:
recipients:
- xxxxx@gmail.com
notify:
success: true
failure: true
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。