简体   繁体   English

Fastlane,如何在 ios 应用程序中使用匹配来指示我的主机和共享扩展的 PROVISIONING_PROFILE_SPECIFIER?

[英]Fastlane, how do I use match to indicate PROVISIONING_PROFILE_SPECIFIER for my host and share extension in ios app?

I simply use following option for gym:我只是在健身房使用以下选项:

def archive(options)
  build_ios_app(
    workspace: PLZ_WORKSPACE,
    scheme: options[:scheme],
    clean: true,
    export_method: options[:adhoc] ? "ad-hoc" : "app-store",
    output_directory: OUTPUT_PATH,
    export_options: {
      signingStyle: "manual", #added to make it working
      provisioningProfiles: { 
        options[:bundle_id] => options[:provisioning],
        options[:share_bundle_id] => options[:share_provisioning]
      },
    },
    #xcargs: { :PROVISIONING_PROFILE_SPECIFIER => options[:provisioning] },
  )
end

Commented line must be defined for both targets different way:必须以不同的方式为两个目标定义注释行:

for my host app ( options[:bundle_id] ):对于我的主机应用程序( options[:bundle_id] ):

#xcargs: { :PROVISIONING_PROFILE_SPECIFIER => options[:provisioning] },

and for my share extension ( options[:share_bundle_id] )对于我的共享扩展( options[:share_bundle_id]

#xcargs: { :PROVISIONING_PROFILE_SPECIFIER => options[:share_provisioning] },

Is there a way to do this here using fastlane match?有没有办法在这里使用 fastlane match 做到这一点? I do not wanna keep everything in separated repository.我不想将所有内容都保存在单独的存储库中。 I just need to make that one change here;)我只需要在此处进行一项更改;)

Thank you for your help.谢谢您的帮助。

EDIT编辑

I will create and award bounty of 200 or even more for the one who will help me with this.我将为帮助我的人创造并奖励 200 甚至更多的赏金。 Thank you very much;)非常感谢;)

Or maybe update_project_provisioning is the case to solve it?或者也许update_project_provisioning是解决它的情况?

I used previously the xcargs option, but for two provisioning profiles, it works without this, and only using export_method and export_options :我之前使用了xcargs选项,但是对于两个配置文件,它可以在没有这个的情况下工作,并且只使用export_methodexport_options

def xcode_build
  gym(
    workspace:        "ios/#{xcode_workspace}.xcworkspace",
    scheme:           xcode_workspace,
    output_directory: 'ios',
    output_name:      File.basename(Config.artifacts_path.ios),
    export_method:    match_type.export,
    export_options:   {
      signingStyle:         'manual',
      provisioningProfiles: {
        app_identifier.fetch(:default)   => "match #{match_type.profile} #{app_identifier.fetch(:default)}",
        app_identifier.fetch(:onesignal) => "match #{match_type.profile} #{app_identifier.fetch(:onesignal)}"
      }
    }
  )
end

The match_type values are one of: match_type值是以下之一:

match_type.export : 'ad-hoc' or 'app-store' match_type.export : 'ad-hoc''app-store'
match_type.profile : 'AdHoc' or 'AppStore' match_type.profile : 'AdHoc''AppStore'

More information is available at the 'Gym' official documentation.更多信息可在“健身房”官方文档中找到。
https://docs.fastlane.tools/actions/gym/ https://docs.fastlane.tools/actions/gym/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 fastlane 将我的 iOS 应用程序编译成 an.xcarchive,然后单独签名并制作 IPA? - How do I use fastlane to compile my iOS app into an .xcarchive, then separately sign and make an IPA? 对于 iOS 的通知服务扩展,我是否需要分发配置文件? - Do i require distribution provisioning profile for notification service extension for iOS? 我应该为Hudson构建我的iOS应用程序使用哪种配置文件? - What sort of provisioning profile should I use for Hudson building my iOS app? 如何将我的应用程序的应用程序标识符与配置文件匹配? - How to match my App's application identifier with provisioning profile? 如何创建配置文件以允许我的团队或客户中的开发人员使用未发布应用程序的早期构建? - How do I create a provisioning profile that allows developers on my team or clients to use early-stage builds of an unreleased app? 如何在iOS应用程序中嵌入配置文件 - How Do You Embed a Provisioning Profile in an iOS App 从 iOS 共享扩展中保存文件以供主机应用程序使用 - Save files from iOS share extension for use by host app 如何使用iOS共享扩展程序使用Xamarin Forms从Photos应用程序检索图像? - How do I use iOS Share Extension to retrieve an image from the Photos App using Xamarin Forms? ios app的配置文件 - Provisioning profile for ios app 如何让我的 fastlane build (gym) 具有多个目标以查找我的配置文件 - How do I get my fastlane build (gym) with multiple targets to find my provisioning profiles
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM