首页 > 解决方案 > 使用 github 操作在 ios 上部署 ionic 应用程序

问题描述

我正在尝试在 macOS 上使用 Gitgub 操作构建项目,但我无法添加授权密钥,xcode 中的构建命令给了我这个错误: ** ARCHIVE FAILED ** error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target 'App' from project 'App') error: No profiles for '' were found: Xcode couldn't find any iOS App Development provisioning profiles matching ''. (in target 'App' from project 'App')

这是我的代码:

 - name: Build ipa
    run: ionic capacitor build ios --release --prod --no-open

 - name: Import Codesign Certificate
    uses: Apple-Actions/import-codesign-certs@v1
    with:
      p12-file-base64: ${{secrets.IOS_DISTRIBUTION_P12_CER}}
      p12-password: ${{secrets.DIST_CERT_P12_PASSWORD}}

- name: Archive
    run: xcodebuild -workspace ios/App/App.xcworkspace
      -scheme App clean archive -configuration release
      -sdk iphoneos -allowProvisioningUpdates DEVELOPMENT_TEAM=${{secrets.APPLE_TEAM_ID}} -archivePath ios/App/App.xcarchive

标签: iosxcodedeploymentcode-signinggithub-actions

解决方案


您需要首先为您的应用设置配置文件:您可以使用此操作自动下载它们:

https://github.com/Apple-Actions/download-provisioning-profiles


推荐阅读