Fastlane: There does not seem to be a CURRENT_PROJECT_VERSION key set for this project
Asked Answered
J

2

6

I were following this website guide on setting up fastlane with hockeyapp but I encountered error

: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."}

I have created build_number_icon.rb in actions folder and I even tried to hardcode the build_number and test run the fastlane. Still getting the same error. Am I missing something? I have been reading the guides again just in case I have missed the steps.

 # 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")

end

Jampack answered 16/6, 2016 at 16:3 Comment(0)
J
13

Fixed the error when you need to set a number at project's build settings > Current project version.

Jampack answered 17/6, 2016 at 3:9 Comment(1)
Looks like you answered your own question just as I was answering!Frost
F
9

I use fastlane, but not with hockey. I've not personally encountered this issue. However, the warning is alerting you to a specific issue inside your project's target > build setting tool (listed as "Current Project Version" under the "Versioning" subsection). In the search field, enter CURRENT_PROJECT_VERSION and you'll see that this is a different value than your build_number. My project does not have it set, but I suppose hockey maybe has different needs?

At any rate, it seems as though you're overlooking the precise key-value being asked for.

Frost answered 17/6, 2016 at 3:14 Comment(2)
Yea.. Been cracking my head for some time. Thanks for answering!Jampack
Here's a link on how to set it up according to Apple's documentation: developer.apple.com/library/content/qa/qa1827/_index.htmlDiggins

© 2022 - 2024 — McMap. All rights reserved.