簡體   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