Skip to content

Instantly share code, notes, and snippets.

@jacobvanorder
Created December 8, 2015 15:26
Show Gist options
  • Save jacobvanorder/74e59f85d2994c151889 to your computer and use it in GitHub Desktop.
Save jacobvanorder/74e59f85d2994c151889 to your computer and use it in GitHub Desktop.
Fastlane Info Plist
fastlane_version "1.46.0"
default_platform :ios
platform :ios do
desc "Get plist values"
lane :plist do
# plist_file_path = "AppProject/Info.plist" #works
# plist_file_path = sh("xcodebuild -project ../AppProject.xcodeproj -showBuildSettings -configuration Release | grep \"INFOPLIST_FILE\" | sed 's/[ ]*INFOPLIST_FILE = //'") #doesn't work
# dynamically getting the path results in the error `You passed invalid parameters to 'get_info_plist_value'.`
version_number = get_info_plist_value(path: plist_file_path, key: 'CFBundleShortVersionString')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment