2017-08-02 46 views
2

我目前正嘗試通過CircleCI使用Fastlane爲React-Native應用設置iOS部署,並且我遇到了一個問題,其中我的pilot位於我的fastlane腳本,我將構建上傳到iTunes Connect,但構建從用於TestFlight內部測試人員中消失。如果我在本地存檔並上傳到iTunes Connect,它將可用於測試。構建不適用於通過CircleCI fastlane部署進行內部測試的iTunes Connect

Fastfile,使用的版本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 

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 

從CircleCI測試

CircleCI results

構建完成處理的輸出iTunes Connect中

iTunes Connect

構建不可用(不可見)TestFlight選項卡上

TestFlight

我試圖用相同的證書和配置文件的本地存檔調試這一點,但它成功地上傳和我能夠在TestFlight上分發給內部測試人員。

非常感謝您的幫助。

回答

1

找到幫助解決此問題的解決方案。

兩部分似乎幫助解決問題

  1. 改變從adhoc使用的配置文件來appstore

    一個。我必須通過比賽來產生AppStore的供應配置文件:

    fastlane match appstore -a com.myapp.app.staging 
    
  2. 添加include_symbolsinclude_bitcodegym構建參數。

處理時間比平常長,但加工後在那裏pilot承認它,它發佈到TestFlight,它返回到構建列表。

我的新中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 
相關問題