设置Fastlane+;iOS应用程序与iMessage应用程序扩展匹配

设置Fastlane+;iOS应用程序与iMessage应用程序扩展匹配,ios,xcode,fastlane,imessage-extension,Ios,Xcode,Fastlane,Imessage Extension,我在让我们的CI服务器构建我们的应用程序时遇到问题(如果相关的话,我们使用Jenkins) 我们之前已经将Jenkins构建设置为与Fastlane/Sigh/Gym协同工作,但是,由于我们最近在应用程序中添加了iMessage扩展,构建过程中断了 我读到的所有内容都指向这样一个事实,即我应该使用Match来获取签名证书,而不是叹息,因此我转而使用Match 我也无法让Sign正常工作,因为它生成的证书似乎忽略了两个证书都需要应用程序组功能的事实(都具有相应的“group.com.mycop.m

我在让我们的CI服务器构建我们的应用程序时遇到问题(如果相关的话,我们使用Jenkins)

我们之前已经将Jenkins构建设置为与Fastlane/Sigh/Gym协同工作,但是,由于我们最近在应用程序中添加了iMessage扩展,构建过程中断了

我读到的所有内容都指向这样一个事实,即我应该使用Match来获取签名证书,而不是叹息,因此我转而使用Match

我也无法让Sign正常工作,因为它生成的证书似乎忽略了两个证书都需要应用程序组功能的事实(都具有相应的“group.com.mycop.myapp”应用程序组)

在切换到Match之后,我在本地开发机器上构建应用程序的成功率有限。我现在在Match命令中使用应用程序标识符数组

这将成功地将证书下载到本地计算机。(经过多次尝试,并使用无效证书前后移动,我终于在CI服务器上实现了这一步骤)

接下来,在本地计算机上成功运行Gym,但在CI服务器上失败,并显示以下消息:

SDK“iOS 10.1”中的产品类型“应用程序扩展”需要代码签名

查看完整日志文件的末尾,我可以看到消息

检查依赖项

没有'com.mycop.appname.iMessage'的配置文件 已找到:Xcode找不到匹配的配置文件 'com.mycomp.appname.iMessage'

产品需要代码签名 在SDK“iOS 10.1”中键入“应用程序扩展”

Fastfile中的这条通道如下所示:

  lane :production_build do

    # grab the appropriate full paths
    project_path = File.expand_path("./", __FILE__)
    xcodeproj_path = File.join(project_path, 'AppName.xcodeproj')
    xcodeworkspace_path = File.join(project_path, 'AppName.xcworkspace')

    # update the correct entitlements file for production
    srcEntitlements = File.join(project_path, 'AppName-Prod.entitlements')
    destEntitlements = File.join(project_path, 'AppName.entitlements')
    print "copying Entitlements file\n from: #{srcEntitlements}\n to  : #{destEntitlements}\n"
    FileUtils.cp(srcEntitlements, destEntitlements)

    # switch the xcproject details to the appropriate team 
    # (we use different teams for Dev and Prod) 
    update_project_team(
      path: xcodeproj_path,
      teamid: "XYZZY"
    )
    # we have a couple of other steps here to ensure the project configuration
    # uses the correct AppIds but I've excluded them for brevity 

    # download the appropriate certs
    match(type: "appstore",
        app_identifier: ["com.mycomp.appname", "com.mycomp.appname.iMessage"],
        team_name: "Team Name",
        team_id: "XYZZY"
        )

    # These old Sigh commands appear to ignore the App Groups requirements 
    #    sigh(force: true, adhoc: true, app_identifier:"com.mycomp.appname")
    #    sigh(force: true, adhoc: true, app_identifier:"com.mycomp.appname.iMessage")
    gym(scheme: "AppName Production", workspace: xcodeworkspace_path) 
  end
我在两台机器上运行相同的组件和最新版本:

  • XCode v8.1
  • Fastlane v1.111.0
  • 健身房v1.12.1
  • 匹配v0.11.0
  • 叹息v1.12.0
我猜这在我的本地开发计算机上正常工作,因为我总是在XCode中加载项目,我假设它修复了证书映射,而在CI服务器上我没有这样做

如何正确映射证书,使其在CI服务器上工作

或者,我如何设置它,以便Sigh生成具有正确应用程序组要求的证书