繁体   English   中英

如何让我的 fastlane build (gym) 具有多个目标以查找我的配置文件

[英]How do I get my fastlane build (gym) with multiple targets to find my provisioning profiles

我的快速文件:

lane :build do |options|
    match(
      app_identifier: [
         ENV['IOS_APP_ID'], 
         ENV['SIRI_BUNDLE_ID'], 
         ENV['PUSH_INTERCEPTOR_BUNDLE_ID'], 
         ENV['WIDGETS_BUNDLE_ID']
      ],
      shallow_clone: true,
      clone_branch_directly: true,
      readonly: true
    )
    update_code_signing_settings(
      use_automatic_signing: false,
      path: xcodeproj,
      targets: ios_target_names
    )

    gymOptions = ({
      silent: true,
      export_team_id: ENV['IOS_TEAM_ID'],
      export_options: {
        signingStyle: "manual",
        provisioningProfiles: { 
          ENV['IOS_APP_ID'] => "match AdHoc #{ENV['IOS_APP_ID']}",                                                   
          ENV['SIRI_BUNDLE_ID'] => "match AdHoc #{ENV['SIRI_BUNDLE_ID']}",
          ENV['PUSH_INTERCEPTOR_BUNDLE_ID'] => "match AdHoc #{ENV['PUSH_INTERCEPTOR_BUNDLE_ID']}",
          ENV['WIDGETS_BUNDLE_ID'] => "match AdHoc #{ENV['WIDGETS_BUNDLE_ID']}"
        }
      }
    }).merge(
      File.directory?("../#{xcworkspace}") ?
        {workspace: xcworkspace} :
        {project: xcodeproj}
    )
    gym(gymOptions)

从输出中,看起来一切都设置正确:

|                                         Installed Provisioning Profile                                          |
+---------------------+---------------------------------------------+---------------------------------------------+
| Parameter           | Environment Variable                        | Value                                       |
+---------------------+---------------------------------------------+---------------------------------------------+
| App Identifier      |                                             | com.company.app.SiriAction          |
| Type                |                                             | adhoc                                       |
| Platform            |                                             | ios                                         |
| Profile UUID        | sigh_com.company.app.SiriAction_ad  | exxxxxx-1xxxx-4xxx-bxxx-7xxxxxxx        |
|                     | hoc                                         |                                             |
| Profile Name        | sigh_com.company.app.SiriAction_ad  | match AdHoc                                 |
|                     | hoc_profile-name                            | com.company.app.SiriAction          |
| Profile Path        | sigh_com.company.app.SiriAction_ad  | /Users/myuser/Library/MobileDevice/Pro  |
|                     | hoc_profile-path                            | visioning                                   |
|                     |                                             | Profiles/exxxxxx-1xxxx-4xxx-bxxx-7xxxxxxx  |
|                     |                                             | 6a8.mobileprovision                         |
| Development Team ID | sigh_com.company.app.SiriAction_ad  | 38XXXXXXXX                                  |
|                     | hoc_team-id                                 |                                             |
+---------------------+---------------------------------------------+---------------------------------------------+
// This repeats for each provisioning profile...



+---------------------------------------------------------------------+---------------------------------------------------------------+
|                                                       Summary for gym 2.206.2                                                       |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| silent                                                              | true                                                          |
| export_team_id                                                      | 38XXXXXXXX                                                    |
| export_options.signingStyle                                         | manual                                                        |
| export_options.provisioningProfiles.com.company.app.staging       | match AdHoc com.company.app.staging                         |
| export_options.provisioningProfiles.com.company.app.SiriAc  | match AdHoc com.company.app.SiriAction                |
| tion                                                                |                                                               |
| export_options.provisioningProfiles.com.company.app.PushIntercep  | match AdHoc com.company.app.PushInterceptor                 |
| tor                                                                 |                                                               |
| export_options.provisioningProfiles.com.company.app.Widgets       | match AdHoc com.company.app.Widgets                         |
| workspace                                                           | ios/app.xcworkspace                                          |
| export_method                                                       | ad-hoc                                                        |
| scheme                                                              | app                                                          |
| clean                                                               | false                                                         |
| output_directory                                                    | dist                                                          |
| output_name                                                         | app                                                           |
| skip_package_ipa                                                    | false                                                         |
| skip_package_pkg                                                    | false                                                         |
| build_path                                                          | /Users/myuser/Library/Developer/Xcode/Archives/2022-06-24 |
| result_bundle                                                       | false                                                         |
| buildlog_path                                                       | ~/Library/Logs/gym                                            |
| destination                                                         | generic/platform=iOS                                          |
| xcodebuild_formatter                                                | xcpretty                                                      |
| skip_profile_detection                                              | false                                                         |
| xcodebuild_command                                                  | xcodebuild                                                    |
| skip_package_dependencies_resolution                                | false                                                         |
| disable_package_automatic_updates                                   | false                                                         |
| use_system_scm                                                      | false                                                         |
| xcode_path                                                          | /Applications/Xcode.app                                       |
+---------------------------------------------------------------------+---------------------------------------------------------------+

但后来我收到错误说它找不到证书:

[12:22:16]: ▸ ❌  error: "PushInterceptor" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'PushInterceptor' from project 'app')
[12:22:16]: ▸ ❌  error: "SiriAction" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'SiriAction' from project 'app')
[12:22:16]: ▸ ❌  error: "WidgetsExtension" requires a provisioning profile with the App Groups feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'WidgetsExtension' from project 'app')
[12:22:16]: ▸ ❌  error: "app" requires a provisioning profile with the Associated Domains, Siri, In-App Purchase, App Groups, Sign in with Apple, and Push Notifications features. Select a provisioning profile in the Signing & Capabilities editor. (in target 'app' from project 'app')

我已经检查了 Apple 开发人员门户中每个证书的功能是否正确,并尝试了针对类似问题找到的所有答案组合。

这个输出表明一切都是正确的,对吧? 我可以做些什么来进一步调试或更正配置?

好像我在本地没有配置文件,或者我没有正确指向它们。 还有其他想法吗?

设置这些选项可能会有所帮助。 update_project_provisioningupdate_project_provisioning

install_provisioning_profile(
  path: "profilename.mobileprovision"
)
update_project_provisioning(
  xcodeproj: "Project.xcodeproj",
  profile: "./watch_app_store.mobileprovision", # optional if you use sigh
  target_filter: ".*WatchKit Extension.*", # matches name or type of a target
  build_configuration: "Release",
  code_signing_identity: "iPhone Development" # optionally specify the codesigning identity
)

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM