簡體   English   中英

是否可以在帶有擴展的 iOS 應用上使用 Fastlane?

[英]Is it possible to use Fastlane on an iOS app with extensions?

我正在為我正在開發的應用程序添加通知服務擴展,但我無法重新配置我的 Fastlane 設置以使用該擴展。

問題

我不知道如何正確配置我的證書以允許新的擴展。 錯誤消息如下: error: No profile for team 'TEAMID' matching 'App Provisioning Profile' found: Xcode couldn't find any provisioning profiles matching 'TEAMID/App Provisioning Profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'NotificationModifier' from project 'Yeshivat Torat Shraga') error: No profile for team 'TEAMID' matching 'App Provisioning Profile' found: Xcode couldn't find any provisioning profiles matching 'TEAMID/App Provisioning Profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'NotificationModifier' from project 'Yeshivat Torat Shraga')

我試過的

  • 我嘗試對證書進行核對
  • 和很多谷歌搜索,但我很迷茫

相關代碼和輸出

以下是快車道摘要:

+------+-----------------------------------------------------+-------------+
|                             fastlane summary                             |
+------+-----------------------------------------------------+-------------+
| Step | Action                                              | Time (in s) |
+------+-----------------------------------------------------+-------------+
| 1    | default_platform                                    | 0           |
| 2    | Switch to ios load_asc_api_key lane                 | 0           |
| 3    | app_store_connect_api_key                           | 0           |
| 4    | Switch to ios prepare_signing lane                  | 0           |
| 5    | create_keychain                                     | 0           |
| 6    | match                                               | 2           |
| 7    | Switch to ios fetch_and_increment_build_number lane | 0           |
| 8    | get_version_number                                  | 0           |
| 9    | latest_testflight_build_number                      | 2           |
| 10   | increment_build_number                              | 5           |
| 11   | Switch to ios build_release lane  <== Crashing lane | 0           |
| 12   | update_code_signing_settings                        | 0           |
| 💥   | gym                                                 | 262         |
+------+-----------------------------------------------------+-------------+

這是我的build_release通道:

  desc "Build the iOS app for release"
  lane :build_release do |options|
    app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
    app_profile_name = "match AppStore " + app_identifier
    profile_name = "App Provisioning Profile" # the name of the profile to use for the build
    output_name = "YTS" # specify the name of the .ipa file to generate
    export_method = "app-store" # specify the export method
    compile_bitcode = true # specify whether to enable bitcode
 
    # turn off automatic signing during build so correct code signing identity is guaranteed to be used
    update_code_signing_settings(
      use_automatic_signing: false,
      targets: ["Yeshivat Torat Shraga", "NotificationModifier"], # specify which targets to update code signing settings for
      code_sign_identity: "Apple Distribution", # replace with name of code signing identity if different
      # bundle_identifier: app_identifier,
      profile_name: profile_name,
      build_configurations: ["Release"] # only toggle code signing settings for Release configurations
    )

    settings_to_override = {
      :BUNDLE_IDENTIFIER => "com.appdevname.YTS",
      :PROVISIONING_PROFILE_SPECIFIER => app_profile_name,
      # Use BUILDCACHE override compiler paths to ensure that the correct compiler paths are used.
      :CC => "clang",
      :CPLUSPLUS => "clang++",
      :LD => "clang",
      :LDPLUSPLUS => "clang++",
    }

 
    # build the app
    gym(
      scheme: "Yeshivat Torat Shraga", # replace with name of your project's scheme
      output_name: output_name,
      configuration: "Release",
      xcargs: settings_to_override,
      export_options: {
        method: export_method,
        # provisioningProfiles: {
        #   app_identifier => app_profile_name
        # },
        compileBitcode: compile_bitcode
      }
    )
    end


我認為問題的根源在於 fastlane 使用的證書不包括我添加的通知服務擴展,但我不知道從哪里開始修復它。

我通過刪除對證書和配置文件名稱的任何引用解決了這個問題,並讓 Fastlane 自己處理證書。 我仍然有一些權利問題,如果我在這方面取得進展,我會更新這個答案。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM