Skip to content

Commit

Permalink
bplist: doc: update docs to reflect changes to ns_keyed_archiver
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmcdona committed Dec 19, 2022
1 parent a9047c0 commit 129b4b7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions format/apple/bplist/bplist.md
Expand Up @@ -20,6 +20,8 @@ $ fq 'torepr.SomeTimeStamp | todescription' Info.plist


### Get JSON representation

`bplist` files can be converted to a JSON representation using the `torepr` filter:
```sh
$ fq torepr com.apple.UIAutomation.plist
{
Expand All @@ -33,21 +35,20 @@ A common way that Swift and Objective-C libraries on macOS serialize objects
is through the NSKeyedArchiver API, which flattens objects into a list of elements
and class descriptions that are reconstructed into an object graph using CFUID
elements in the property list. `fq` includes a function, `from_ns_keyed_archiver`,
which will rebuild this object graph into a friendly representation. The `bplist`
data must first be passed through `torepr` to create a JSON representation.
which will rebuild this object graph into a friendly representation.

If no parameters are supplied, it will assume that there is a CFUID located at
`."$top".root` that specifies the root from which decoding should occur. If this
is not present, the user must specify a root object in the `.$objects` list from
which to decode.
is not present, an error will be produced, asking the user to specify a root
object in the `.$objects` list from which to decode.

The following examples show how this might be used (in this case, in the `fq` REPL):
The following examples show how this might be used (in this case, within the `fq` REPL):
```
# Assume $top.root is present
bplist> torepr | from_ns_keyed_archiver
bplist> from_ns_keyed_archiver
# Specify optional root
bplist> torepr | from_ns_keyed_archiver(1)
bplist> from_ns_keyed_archiver(1)
```

### Authors
Expand Down

0 comments on commit 129b4b7

Please sign in to comment.