Build not available on iTunes Connect for internal testing through CircleCI fastlane deployment

亡梦爱人 提交于 2019-12-02 04:25:42

问题


I am currently trying to set up iOS deployment for a React-Native app, using Fastlane through CircleCI, and I am having an issue where I get to pilot in my fastlane script, I upload the build to iTunes Connect, but the build disappears from being used for TestFlight Internal Testers. If I archive locally and upload the build to iTunes Connect, it will be available for testing.

My Fastfile, using version 2.51.0

platform :ios do
  lane :deploy_staging do
    match(
      type: "adhoc",
      force: true
    )

    increment_build_number(
      xcodeproj: './ios/MyApp.xcodeproj'
    )

    gym(
      export_method: "ad-hoc",
      scheme: "MyApp Staging",
      project: "./ios/MyApp.xcodeproj"
    )
    pilot(
      skip_submission: false,
      distribute_external: false,
    )

    clean_build_artifacts
    git_add(
      path: '.'
    )
    git_commit(
      path: '.',
      message: "Deployed new staging version #{lane_context[SharedValues::BUILD_NUMBER]} [skip ci]",
    )
    push_to_git_remote(
      local_branch: ENV["CIRCLE_BRANCH"],
      remote_branch: ENV["CIRCLE_BRANCH"]
    )
  end
end

My circle.yml

machine:
  environment:
    PATH: '$PATH:$HOME/node/node-v8.1.3-darwin-x64/bin'
  xcode:
    version: 8.3.3

dependencies:
  cache_directories:
    - $HOME/node
  pre:
    - "ls \"$HOME/node/node-v8.1.3-darwin-x64\" || mkdir \"$HOME/node\""
    - "ls \"$HOME/node/node-v8.1.3-darwin-x64\" || curl -L \"https://nodejs.org/dist/v8.1.3/node-v8.1.3-darwin-x64.tar.gz\" -o \"$HOME/node/node-v8.1.3-darwin-x64.tar.gz\""
    - "ls \"$HOME/node/node-v8.1.3-darwin-x64\" || tar -xzf \"$HOME/node/node-v8.1.3-darwin-x64.tar.gz\" -C \"$HOME/node/\""
    - "rm -f \"$HOME/node/node-v8.1.3-darwin-x64.tar.gz\""
  override:
    - npm install -g react-native-cli
    - npm install

test:
  override:
    - npm test
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/test_out/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;

deployment:
  pre:
    - gem install fastlane
  staging:
    branch: staging
    commands:
      - npm run build:ios
      - fastlane deploy_staging

Output from the CircleCI test

Build completed processing on iTunes Connect

Build not available (invisible) on TestFlight tab

I tried debugging this by archiving locally with the same certificates and profiles, but it uploads successfully and I am able to distribute to internal testers on TestFlight.

Thanks very much for the help.


回答1:


Found the solution that helped resolve this issue.

Two parts seem to help fix it

  1. Changing profile used from adhoc to appstore

    a. I had to generate the appstore provisioning profile through match:

     fastlane match appstore -a com.myapp.app.staging
    
  2. Adding include_symbols and include_bitcode to my gym build parameters.

Processing took longer than normal, but after processing, it returns to the build list where pilot recognizes it and it posts to TestFlight.

My new Fastfile:

  lane :deploy_staging do    
    match(
      type: "appstore"
    )

    increment_build_number(
      xcodeproj: './ios/MyApp.xcodeproj'
    )

    gym(
      include_symbols: true,
      include_bitcode: true,
      export_method: "app-store",
      scheme: "MyApp Staging",
      project: "./ios/MyApp.xcodeproj"
    ) # Build your app - more options available

    pilot

    clean_build_artifacts
    git_add(
      path: '.'
    )
    git_commit(
      path: '.',
      message: "Deployed new staging version #{lane_context[SharedValues::BUILD_NUMBER]} [skip ci]",
    )
    push_to_git_remote(
      local_branch: ENV["CIRCLE_BRANCH"],
      remote_branch: ENV["CIRCLE_BRANCH"]
    )

  end


来源:https://stackoverflow.com/questions/45471405/build-not-available-on-itunes-connect-for-internal-testing-through-circleci-fast

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!