You are not logged in.
Pages: 1
Hey Guys trying to get the CFBundleVersion from an Xcode Build's .plist via terminal.
defaults read <Filepath/Info>
output is
{
ApplicationProperties = {
ApplicationPath = "Applications/Name.app";
CFBundleIdentifier = "com.name.Name";
CFBundleShortVersionString = "4.2.16";
CFBundleVersion = "4.2.16";
SigningIdentity = "";
Team = "";
};
ArchiveVersion = 2;
CreationDate = "2020-02-27 15:00:31 +0000";
Name = PT;
SchemeName = PT;
}
If I run
defaults read <Filepath/Info> ApplicationProperties
output
{
ApplicationPath = "Applications/Name.app";
CFBundleIdentifier = "com.name.Name";
CFBundleShortVersionString = "4.2.16";
CFBundleVersion = "4.2.16";
SigningIdentity = "";
Team = "";
};
I have tried to do defaults read <Filepath/Info> ApplicationProperties.CFBundleVersion but get this error:
The domain/default pair of (Filepath/Info, ApplicationProperties.CFBundleVersion) does not exist
but I can access the actual CFBundleVersion
any help?
Offline
The defaults command can read any plist file with a path minus the .plist extension
e.g.
$ defaults read /Applications/Burn.app/Contents/Info CFBundleIdentifier
com.kiwifruitware.Burn
$ defaults read /Applications/Burn.app/Contents/Info CFBundleVersion
22
Offline
This is the error I got when I ran that command:
The domain/default pair of (FilePath/Info, CFBundleVersion) does not exist
Running on OSX Mojave 10.14.6
Offline
Just updated to Catalina 10.15.3 but still getting the same error.
Offline
Can you post the full command line you are using, are you sure the plist file is in the correct place? can you list it with ls?
The example I posted above is using burn.app so it wont work unless you have burn installed.
Offline
I am on Catalina 10.15.3 and I still get the same error.
Offline
Pages: 1