Fastlane:该项目似乎没有 CURRENT_PROJECT_VERSION 密钥集

Posted

技术标签:

【中文标题】Fastlane:该项目似乎没有 CURRENT_PROJECT_VERSION 密钥集【英文标题】:Fastlane: There does not seem to be a CURRENT_PROJECT_VERSION key set for this project 【发布时间】:2016-06-16 16:03:31 【问题描述】:

我正在按照website 使用 hockeyapp 设置 fastlane 的指南进行操作,但遇到了错误

:BUILD_NUMBER=>"There does not seem to be a CURRENT_PROJECT_VERSION key set for this project.  Add this key to your target's expert build settings."

我在 actions 文件夹中创建了 build_number_icon.rb,我什至尝试硬编码 build_number 并测试运行 fastlane。仍然得到同样的错误。我错过了什么吗?我一直在阅读指南,以防我错过了这些步骤。

 # Build and publish the Beta version to Hockeyapp
lane :beta_hockeyapp do
# Build
build_app(
  # Not a production release, so add build number and do the color modulation of the icons
  release:false,
  # Modulate the colors of the icons by these degrees
  modulation:66.6,
  # Change the app name
  app_name:"<App Name>",
  # Set the app id
  app_identifier:"com.company.<appname>",
  # Set the path to the certificate to use in building
  certificate_path:"./Certificates/Company/<cert>.p12",
  # Set the password of the p12 certificate file
  certificate_password:"<password>",
  # Set the path to the provisioning profile to use (change this!)
  profile:"./Certificates/Company/<profile>.mobileprovision",
  # What configuration to use, usefull for keeping different API keys etc between environments
  configuration:"[INT] <project_name>",
  # Use this codesigning identity (this is the name of the certificate in your keychain)
  codesigning_identity:"Project Distribution",
  # Export an enterprise app
  export_method:"enterprise",
  # the projectname, this is the name of the .xcodeproj file and the folder containing your code in the project
  project_name:<Project>,
  # the scheme to build
  scheme:"Project-Internal",
  # the build number to use, we use the build number from Jenkins
  build_number: "1234" || ENV["BUILD_NUMBER"] 
)
# Push to Hockeyapp as Beta release
publish_hockey(release_type: "0")

结束

【问题讨论】:

【参考方案1】:

修复了需要在项目的构建设置>当前项目版本中设置数字时的错误。

【讨论】:

看起来你回答了自己的问题,就像我回答的一样!【参考方案2】:

我使用快车道,但不使用曲棍球。我个人没有遇到过这个问题。但是,该警告会提醒您注意项目的目标 > 构建设置工具中的特定问题(在“版本控制”小节下列为“当前项目版本”)。在搜索字段中,输入CURRENT_PROJECT_VERSION,您会看到这是与您的 build_number 不同的值。我的项目没有设置,但我想曲棍球可能有不同的需求?

无论如何,您似乎忽略了所要求的精确键值。

【讨论】:

是的.. 已经有一段时间了。感谢您的回答! 这是一个如何根据 Apple 文档进行设置的链接:developer.apple.com/library/content/qa/qa1827/_index.html

以上是关于Fastlane:该项目似乎没有 CURRENT_PROJECT_VERSION 密钥集的主要内容,如果未能解决你的问题,请参考以下文章

有没有办法在没有 Fastlane 的相应应用程序的情况下创建捆绑标识符?

Teamcity 没有选择 fastlane MATCH_PASSWORD 环境变量

Fastlane 代码签名需要错误

将 fastlane/gym 与 xcode build 进行比较

使用共享框架的 Fastlane 代码设计失败

有没有办法在车道上传递 Fastlane Pilot 的详细标志?