找不到通道“ios 调试”。可用通道:ios beta

Dol*_*hin 5 fastlane

当我在 Fastfile 中添加一个新的 fastlane 时:

\n
default_platform(:ios)\n\nplatform :ios do\n  desc "Push a new beta build to pgy"\n  before_all do\n    ENV["CACHE_GIT_URL"] = ENV["GIT_URL"]\n  end\n\n  lane :debug do\n    xcode_select "/Applications/Xcode.app"\n\n    match(\n        type: "adhoc"\n    )\n\n    build_app(\n        workspace: "Runner.xcworkspace",\n        scheme: "Runner",\n        export_method: "ad-hoc",\n        skip_archive: true\n    )\n\n    pgyer(\n        api_key: ENV['PGY_API_KEY'],\n        user_key: ENV['PGY_USER_KEY']\n    )\n  end\n\n  lane :beta do\n    xcode_select "/Applications/Xcode_12.4.app"\n    if is_ci\n      create_keychain(\n        name: ENV['MATCH_KEYCHAIN_NAME'],\n        password: ENV["MATCH_KEYCHAIN_PASSWORD"],\n        default_keychain: true,\n        unlock: true,\n        timeout: 3600,\n        lock_when_sleeps: false\n      )\n    end\n\n    match(\n      app_identifier: ENV["APP_IDENTIFIER"],\n      git_url: ENV["GIT_URL"],\n      type: "adhoc",\n      readonly: is_ci,\n      keychain_name: ENV['MATCH_KEYCHAIN_NAME'],\n      keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"]\n    )\n\n    build_app(\n        workspace: "Runner.xcworkspace",\n        scheme: "Runner",\n        export_method: "ad-hoc",\n        skip_archive: true\n    )\n\n    pgyer(\n        api_key: ENV['PGY_API_KEY'],\n        user_key: ENV['PGY_USER_KEY']\n    )\n  end\nend\n
Run Code Online (Sandbox Code Playgroud)\n

我添加了一个名为 的新通道debug,但是当我运行命令时:

\n
bundle exec fastlane debug\n
Run Code Online (Sandbox Code Playgroud)\n

显示错误:

\n
$ bundle exec fastlane debug                                                                                                                                            \xe2\x80\xb9ruby-2.7.2\xe2\x80\xba\n[\xe2\x9c\x94] \n+-----------------------+---------+--------+\n|               Used plugins               |\n+-----------------------+---------+--------+\n| Plugin                | Version | Action |\n+-----------------------+---------+--------+\n| fastlane-plugin-pgyer | 0.2.2   | pgyer  |\n+-----------------------+---------+--------+\n\n[16:51:14]: ------------------------------\n[16:51:14]: --- Step: default_platform ---\n[16:51:14]: ------------------------------\n+------------------+-----+\n|      Lane Context      |\n+------------------+-----+\n| DEFAULT_PLATFORM | ios |\n+------------------+-----+\n[16:51:14]: Could not find lane 'ios debug'. Available lanes: ios beta\n\n+------+------------------+-------------+\n|           fastlane summary            |\n+------+------------------+-------------+\n| Step | Action           | Time (in s) |\n+------+------------------+-------------+\n| 1    | default_platform | 0           |\n+------+------------------+-------------+\n\n[16:51:14]: fastlane finished with errors\n\n[!] Could not find lane 'ios debug'. Available lanes: ios beta\n
Run Code Online (Sandbox Code Playgroud)\n

我应该做什么来修复它?

\n

nor*_*dar 0

我会回答其他遇到这个问题的人。

请打开 Fastfile 文件。

编辑:

lane :... do
  ...
end
Run Code Online (Sandbox Code Playgroud)

到你的代码。