Skip to content

'defaults' command doesn't read plists anymore; use PlistBuddy instead #3

@snej

Description

@snej

The script uses the defaults command to read the bundle version from the app's Info.plist. Unfortunately defaults doesn't support that anymore — as threatened in its man page, it's stopped working on anything but actual registered defaults domains. (I don't know when this changed, but this is how it is in El Capitan.)

Instead, use PlistBuddy; for example to get the bundle version:

/usr/libexec/PlistBuddy MyApp.app/Contents/Info.plist -c 'Print CFBundleVersion'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions