'flutter build ios'在GitHub Actions工作流中失败,错误:“配置文件缺少必需的UUID属性”

问题描述 投票:0回答:1

[我正在尝试通过GitHub Actions自动执行ios构建和发布。

当我从GitHub操作工作流程中运行“ flutter build ios”时,我的配置文件无法加载。当我运行“ flutter build ios”时,相同的配置文件可以很好地加载到本地计算机上。我的供应配置文件的名称是UUID。该配置文件有效,尚未过期。

此外,当我在本地对我的配置文件进行编码,然后解码为文件时,它仍然可以正常工作,因此编码不应该成为问题。

如何在github操作上成功将我的配置文件加载到xcodebuild?

相关代码在下面...

 - name: Create Prov-Profile Directory
        run: mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles

      - name: Decode Profile, write to file
        run: base64 --decode $ENCODED_PROVISIONING > ~/Library/MobileDevice/Provisioning\ Profiles/011193f8-4843-412f-933e-13310304ae74.mobileprovision  




      - name: Run Flutter build iOS
        run: flutter build ios

错误信息:

Building com.wikilane.invoicehome for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: TJU6BLUV7H
Running pod install...                                            202.0s (!)
Running Xcode build...                                          
Xcode build done.                                            5.9s
Failed to build iOS app
Error output from Xcode build:
↳
    2020-04-24 15:53:17.930 xcodebuild[2025:15947]  DVTProvisioningProfileManager: Failed to load profile "/Users/runner/Library/MobileDevice/Provisioning Profiles/011193f8-4843-412f-933e-13310304ae74.mobileprovision" (Error Domain=DVTProvisioningProfileProviderErrorDomain Code=1 "Failed to load profile." UserInfo={NSLocalizedDescription=Failed to load profile., NSLocalizedRecoverySuggestion=Profile is missing the required UUID property.})
    ** BUILD FAILED **


Xcode's output:
↳
    note: Using new build system
    note: Planning build
    note: Constructing build description
    error: No profile for team 'TJU6BLUV7H' matching 'Nick Fox Distribution AppStore' found: Xcode couldn't find any provisioning profiles matching 'TJU6BLUV7H/Nick Fox Distribution AppStore'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'Runner' from project 'Runner')

Encountered error while building for device.

我的GitHub动作工作流:

on:
  push:
    branches:
      - ios-actions-test  #this workflow triggers only on pushes to ios branch with tags below...
      #presence of any version tag x.x.x will trigger this Test, Build and Release.
jobs:
  build:
    name: Release IPA
    runs-on: macos-latest
    steps:
      - uses: actions/[email protected]  #checks-out your repository to $GITHUB_WORKSPACE, so that your workflow can access the contents of your repository. folder locations relative to github.com
      - uses: actions/setup-java@v1  #sets up java environment
        with:
          java-version: "12.x"
      - uses: subosito/[email protected]  #sets up flutter environment
        with:
          channel: "stable"
      - run: flutter pub get
      #- run: flutter test

      - name: Get the version
        id: get_version
        run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

      - name: Get last tag message
        id: get_last_message
        run: |
             echo ::set-output name=COMMIT_MSG::$(git tag -l --format='%(contents:subject)' ${{ steps.get_version.outputs.VERSION }})

      - name: Create and Configure Keychain  #We create a new keychain with empty password, add it to the list of keychains, make it the default one and unlock it. We make sure that it does not auto-lock and that it does not prompt user through UI alerts.
        run: |
              security create-keychain -p "" "$KEYCHAIN"
              security list-keychains -s "$KEYCHAIN"
              security default-keychain -s "$KEYCHAIN"
              security unlock-keychain -p"" "$KEYCHAIN"
              security set-keychain-settings
              security list-keychains  

      - name: Get Secrets, decode Certificates to file
        env: 
          ENCODED_LOCKED_CERTIFICATES: ${{ secrets.IOS_CERTIFICATES }} 
          CERTIFICATES_PASSWORD: ${{ secrets.IOS_CERTIFICATES_PASSWORD }}
          ENCODED_PROVISIONING: ${{ secrets.IOS_PROVISIONING }} 


        run: echo "$ENCODED_LOCKED_CERTIFICATES" | base64 --decode > LockedCertificates.p12
      - name: Import Certificate to Keychain
        run: security import LockedCertificates.p12 -k "$KEYCHAIN" -P mypassword -A 

      - name: Create Prov-Profile Directory
        run: mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles

      - name: Decode Profile, write to file
        run: base64 --decode $ENCODED_PROVISIONING > ~/Library/MobileDevice/Provisioning\ Profiles/011193f8-4843-412f-933e-13310304ae74.mobileprovision  #need to revisit this to fix UUID renaming problem




      - name: Run Flutter build iOS
        run: flutter build ios

      - name: Build XCode archive
        run: xcodebuild archive ```
flutter github action uuid provisioning
1个回答
0
投票

我尝试过flutter build ios -no--codesign,并且能够将罐子踢到xcodebuild存档的道路上。但是当前尝试存档时存在相同的问题。

© www.soinside.com 2019 - 2024. All rights reserved.