Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 使用Fastlane match进行临时和应用商店构建_Ios_Firebase_Circleci_Fastlane_Fastlane Match - Fatal编程技术网

Ios 使用Fastlane match进行临时和应用商店构建

Ios 使用Fastlane match进行临时和应用商店构建,ios,firebase,circleci,fastlane,fastlane-match,Ios,Firebase,Circleci,Fastlane,Fastlane Match,我希望能够为Firebase Distribution进行adhoc构建,并为TestFlight/appstore进行appstore构建。我也在使用CI/CD系统(CircleCI)。我使用fastlain match进行构建签名。我的问题是,当进行不同类型的构建时,如何在不同类型的证书之间切换 我的想法是在Xcode中设置调试配置临时签名证书和发布配置appstore证书。然而,当我测试这种方法时,发现在应用程序启动后,临时构建立即崩溃,所以看起来这种方法是不正确的 这是我的快速文件:

我希望能够为
Firebase Distribution
进行
adhoc
构建,并为TestFlight/appstore进行
appstore
构建。我也在使用CI/CD系统(
CircleCI
)。我使用
fastlain match
进行构建签名。我的问题是,当进行不同类型的构建时,如何在不同类型的证书之间切换

我的想法是在Xcode中设置调试配置临时签名证书和发布配置appstore证书。然而,当我测试这种方法时,发现在应用程序启动后,临时构建立即崩溃,所以看起来这种方法是不正确的

这是我的快速文件:

platform :ios do
  before_all do
    setup_circle_ci
  end

  desc "Runs tests and build the app "
  lane :testandbuild do |options|
     commit = last_git_commit
     # Uncomment the line if you want to increment build number  
     # increment_build_number(xcodeproj: "MyApp.xcodeproj")
     scan(
        scheme: "MyApp"
    )
    if(options[:branch] == "main")
      increment_build_number
      keyFilePath = File.join(Dir.pwd, "appStoreKey.p8")
      app_store_connect_api_key(
        key_id: options[:key_id],
        issuer_id: options[:issuer_id],
        key_filepath: keyFilePath,
        # duration: 1200,
        in_house: false,
      )
      match(type: "appstore", readonly: "false")
      build_app(
          scheme: "MyApp",
        configuration: "Release"
      )
      upload_to_testflight(
        skip_waiting_for_build_processing: true
      )
    else
       match(type: "adhoc")
       gym(export_method: "ad-hoc", scheme: "MyApp", configuration: "Debug" , output_directory: "../output")
       firebase_app_distribution(
               groups: 'dev-team',
               release_notes: "Branch: #{options[:branch]}. Message: #{commit[:message]}",
               firebase_cli_token: options[:firebase_cli_token]
       )
    end       
  end
end

我在我添加的
健身房中找到了解决方案
xcargs:“PROVISIONING_PROFILE_SPECIFIER='match AdHoc myapp.com'”
对于
AdHoc
构建和
appStore
构建,我添加了
xcargs:“PROVISIONING_PROFILE_SPECIFIER='match appStore myapp.com'


我删除了临时构建
配置:“Debug”

我在健身房里使用了类似以下的东西

gym(
    workspace: xcodeworkspace,
    scheme: environment,
    configuration: environment,
    silent: true,
    clean: true,
    export_method: "ad-hoc",
    export_options: {
        provisioningProfiles: { 
            app_identifier => app_profile_name,
            balance_widget_identifier => balance_widget_profile_name
        }
    }
)
这样,我也可以为“今日扩展”定义不同的概要文件(针对不同的构建)