【问题标题】:Failed to create ipa for Adhoc through Codemagic无法通过 Codemagic 为 Adhoc 创建 ipa
【发布时间】:2021-11-07 12:17:40
【问题描述】:

我正在尝试通过 Codemagic 生成 ipa,但它通过了所有脚本并且无法生成 ipa

workflows:
  prod-adhoc:
    name: Production Build - AdHoc Distribution
    environment:
      vars:
        XCODE_WORKSPACE: "project.xcworkspace"
        XCODE_SCHEME: "project"
        BUNDLE_ID: "com.project.app"
        APP_STORE_CONNECT_ISSUER_ID: Encrypted()
        APP_STORE_CONNECT_KEY_IDENTIFIER: Encrypted()
        APP_STORE_CONNECT_PRIVATE_KEY: Encrypted()
        CERTIFICATE_PRIVATE_KEY: Encrypted()
      xcode: latest
      cocoapods: default
    scripts:
      - find . -name "Podfile" -execdir pod install \;
      - name: Set up keychain to be used for codesigning using Codemagic CLI 'keychain' command
        script: keychain initialize
      - name: Fetch signing files
        script: # You can allow creating resources if existing are not found with `--create` flag
            app-store-connect fetch-signing-files $BUNDLE_ID --type IOS_APP_ADHOC --create
      - name: Set up signing certificate
        script:
          xcode-project use-profiles
      - name: Increment build number
        script: agvtool new-version -all $BUILD_NUMBER
      - name: Build ipa for Adhoc
        script: xcode-project build-ipa --workspace "$XCODE_WORKSPACE" --scheme "$XCODE_SCHEME" --verbose
    artifacts:
      - build/ios/ipa/*.ipa
      - /tmp/xcodebuild_logs/*.log
      - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM
    publishing:
      email:
        recipients:
          - neha@gmail.com

❌ 错误:未找到签名证书“​​iOS Distribution”:未找到与团队 ID“XXXXX”匹配的带有私钥的“iOS Distribution”签名证书。 (在项目“项目”的目标“项目”中)

❌ 错误:未找到签名证书“​​iOS Distribution”:未找到匹配团队 ID“xxxxxx”和私钥的“iOS Distribution”签名证书。 (在项目“项目”的目标“OneSignalNotificationServiceExtension”中)

我已检查项目设置是否为自动

【问题讨论】:

    标签: ios native codemagic


    【解决方案1】:

    尝试在Fetch signing files之后再添加一个脚本来告诉VM使用证书:

    - name: Use system default keychain
        script: keychain add-certificates
    

    【讨论】:

    • 错误:项目有冲突的配置设置。项目已自动签名以进行开发,但已手动指定了冲突的代码签名身份 iPhone 分发。在构建设置编辑器中将代码签名标识值设置为“Apple Development”,或在签名和功能编辑器中切换到手动签名。 (在项目“项目”的目标“项目”中)
    【解决方案2】:

    检查xcode-project use-profiles 命令的输出。它有关于代码签名设置的详细信息,我想知道为什么错误消息说关于分发证书

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-21
      • 1970-01-01
      • 2020-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多