Flutter - CodeMagic - Shorebird - iOS构建问题

tzxcd3kk  于 2023-10-22  发布在  Flutter
关注(0)|答案(1)|浏览(222)

我想用shorebird codemagic action发布我的ios应用程序。但是我在Step Name => Shorebird Build上得到了一个错误🙌。
以前,我可以不使用shorebird获得释放。
错误=>

[WARN] iOS support is alpha. See ]8;;https://docs.shorebird.dev/status#ios-alpha\https://docs.shorebird.dev/status#ios-alpha]8;;\ for more information.
⠋ Fetching apps...
✓ Fetching apps (0.2s)
⠋ Building release...
✗ Failed to build (197.0s)
    No Accounts
    No profiles for 'x.x.x' were found

Build failed :|
Step 11 script `🙌 Shorebird Build` exited with status code 70

工作流程=>

workflows:
  ios-shorebird-workflow:
    instance_type: mac_mini_m1
    name: iOS ShoreBird Workflow
    environment:
      ios_signing:
        provisioning_profiles:
          - For CodeMagic
        certificates:
          - Code Magic Certificate
      flutter: 3.10.6
      cocoapods: 1.13.0
      xcode: 15.0
      groups:
        - shorebird
        - appstore

    triggering:
      events:
        - tag

    cache:
      cache_paths:
        - $FLUTTER_ROOT/.pub-cache
        - $HOME/Library/Caches/CocoaPods

    integrations:
      app_store_connect: "IOS Codemagic Integration"

    publishing:
      app_store_connect:
        auth: integration
        submit_to_testflight: true

    artifacts:
      - build/ios/ipa/*.ipa

    scripts:
      - name: 🐦 Setup Shorebird
        script: |
          # Install Shorebird
          curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/shorebirdtech/install/main/install.sh -sSf | bash
          
          # Add Shorebird to PATH
          echo PATH="$HOME/.shorebird/bin:$PATH" >> $CM_ENV

      - name: Shorebird flutter versions set to 3.10.6
        script: |
          shorebird flutter versions use 3.10.6

      - name: Set up code signing settings on Xcode project
        script: |
          xcode-project use-profiles

      - name: Flutter Packages Get and Translations
        script: |
          flutter pub get
          flutter packages pub global activate intl_utils
          flutter --no-color pub global run intl_utils:generate

      - name: Pods Install
        script: |
          rm -rf ios/Podfile.lock
          pod install --repo-update --project-directory=./ios

      - name: 🙌 Shorebird Build
        script: |
          echo "➡️ Using tag: $CM_TAG"
          
          # Check type and run corresponding command
          if [ "$TYPE" == *"#"* ]; then
            echo "🩹 Running patch command"
            shorebird patch ios-alpha --force
          else
            echo "🚀 Running release command"
            shorebird release ios-alpha --force
          fi

我试着不使用Shorebird获得释放,没有问题。我尝试在CodeMagic工作流上以不同的方式对应用程序进行签名,但结果没有改变。

vom3gejh

vom3gejh1#

我通过将此参数添加到shorebird release命令解决了这个问题

-- --export-options-plist=/Users/builder/export_options.plist
- name: 🙌 Shorebird Build
        script: |
          echo "➡️ Using tag: $CM_TAG"
          
          # Check type and run corresponding command
          if [ "$TYPE" == *"#"* ]; then
            echo "🩹 Running patch command"
            shorebird patch ios-alpha --force
          else
            echo "🚀 Running release command"
            shorebird release ios-alpha --force \
              -- --export-options-plist=/Users/builder/export_options.plist
          fi

相关问题