Get and Set the bundle id in IDE/Build script

Hi
Does anyone know how to get and set the bundle id in either runtime or a build script ?

Thanks

Alex

The tool “/usr/libexec/PlistBuddy” which gets installed by Xcode’s cmdline tools, can edit plist files per command.

The following code (as a Build Script) adds the key for Cocoa Retina support, for example:

[code] const key = “NSHighResolutionCapable”
const keyType = “bool”
const value = “true”

dim infoPlistPath as string = CurrentBuildLocation+"/"""+CurrentBuildAppName + “.app/Contents/Info.plist”
dim cmd as string = “/usr/libexec/PlistBuddy -c ““Add :” + key + " " + keyType + " " + value + “”” " + infoPlistPath + “””"
dim result as string = DoShellCommand(cmd)

if result <> “” then
print “PlistBuddy not installed. This tool is necessary for the UpdatePlist script to function properly.”+EndOfLine+EndOfLine+cmd+EndOfLine+EndOfLine+result
end[/code]

Instead of the “Add” command you’d use a command to modify an existing entry. Once you have the tool installed, use “man PlistBuddy” to learn of its options.