Using this framework you can read property lists embedded inside of a running executable as well as those of executables
stored on disk. These types of executables are often Command Line Tools. Built-in support is provided for reading both
embedded info and launchd property lists. Custom property list types can also be specified.
Using this framework you can read property lists embedded inside of a running executable as well as those of executables stored on disk. These types of executables are often Command Line Tools. Built-in support is provided for reading both embedded info and launchd property lists. Custom property list types can also be specified.
To see a runnable sample app using this framework, check out SwiftAuthorizationSample.
Usage
Property lists are returned as
Data
instances. Usually you’ll want to deserialize using one of:ProperyListDecoder
‘sdecode(_:from:)
to deserialize theData
into aDecodable
PropertyListSerialization
‘spropertyList(from:options:format:)
to deserialize theData
into anNSDictionary
Example — Read Internal, Create
Decodable
When running inside an executable, decode a launchd property list into a custom
Decodable
struct:Example — Read External, Create
NSDictionary
For an external executable, deserialize an info property list as an
NSDictionary
:Example — Create
Decodable
UsingBundleVersion
Decode an info property list, using
BundleVersion
to decode theCFBundleVersion
entry: