¡@

Home 

2014/10/15 ¤U¤È 10:12:47

iphone Programming Glossary: plistbuddy

How to programmatically display version number of target in iOS app

http://stackoverflow.com/questions/3015796/how-to-programmatically-display-version-number-of-target-in-ios-app

by placing the following in the Run script build phase in the project settings # bin bash buildNumber usr libexec PlistBuddy c Print CFBundleVersion INFOPLIST_FILE buildNumber buildNumber 1 usr libexec PlistBuddy c Set CFBundleVersion buildNumber.. bash buildNumber usr libexec PlistBuddy c Print CFBundleVersion INFOPLIST_FILE buildNumber buildNumber 1 usr libexec PlistBuddy c Set CFBundleVersion buildNumber INFOPLIST_FILE For hexadecimal build number use this script buildNumber usr libexec PlistBuddy.. c Set CFBundleVersion buildNumber INFOPLIST_FILE For hexadecimal build number use this script buildNumber usr libexec PlistBuddy c Print CFBundleVersion INFOPLIST_FILE buildNumber 0x buildNumber buildNumber buildNumber 1 buildNumber printf X buildNumber..

Version vs build in XCode 4

http://stackoverflow.com/questions/6851660/version-vs-build-in-xcode-4

Shell bin bash . Copy and paste the following into the script area for integer build numbers buildNumber usr libexec PlistBuddy c Print CFBundleVersion INFOPLIST_FILE buildNumber buildNumber 1 usr libexec PlistBuddy c Set CFBundleVersion buildNumber.. buildNumber usr libexec PlistBuddy c Print CFBundleVersion INFOPLIST_FILE buildNumber buildNumber 1 usr libexec PlistBuddy c Set CFBundleVersion buildNumber INFOPLIST_FILE As @Bdebeez pointed out the Apple Generic Versioning Tool agvtool is also.. in your plist file so for a 0 based index that's the 3rd preference setting in the array. productVersion usr libexec PlistBuddy c Print CFBundleShortVersionString INFOPLIST_FILE usr libexec PlistBuddy c Set PreferenceSpecifiers 2 DefaultValue buildNumber..

How can I display the application version revision in my application's settings bundle?

http://stackoverflow.com/questions/877128/how-can-i-display-the-application-version-revision-in-my-applications-settings

solution that can be much simpler than either of the previous answers. Apple bundles a command line tool called PlistBuddy inside most of its installers and has included it in Leopard at usr libexec PlistBuddy . Since you want to replace VersionValue.. a command line tool called PlistBuddy inside most of its installers and has included it in Leopard at usr libexec PlistBuddy . Since you want to replace VersionValue assuming you have the version value extracted into newVersion you could use this.. VersionValue assuming you have the version value extracted into newVersion you could use this command usr libexec PlistBuddy c Set VersionValue newVersion path to Root.plist No need to fiddle with sed or regular expressions this approach is quite..