Just An Application

September 19, 2014

The Arcane World Of Xcode 6.0 Downloadable DocSets: Part One — The com.apple.dt.Xcode Package

Assuming you have Xcode 6.0 installed, then if you look in the directory

    ~/Library/Caches

you will find the package

    com.apple.dt.Xcode

If you look inside the package you will find the directory

    Downloads

and in that directory you should find two files each with the suffix

    .dvtdownloadableindex

Running the file command on either of them will produce the result

    Apple binary property list

You can print the contents of each file using the command

    plutil -p <file>

One file identifies downloadable binaries such as the various iOS Simulators and the other identifies downloadable documentation sets.

It is these files that are used to populate the Components and Documentation sections in the Downloads tab of the Xcode Preferences panel.

This is an example of an entry in the latter file

    ...
    
    33 => {
      "source" => ...
      "dependencies" => [
      ]
      "identifier" => "com.apple.adc.documentation.AppleiOS8.0.iOSLibrary"
      "version" => "52.8"
      "fileSize" => 342039461
      "name" => "iOS 8 library"
      "userInfo" => {
        "InstallPrefix" => "$(HOME)/Library/Developer/Shared/Documentation/DocSets"
        "RequiresADCAuthentication" => 1
        "ActivationPredicate" => "$XCODE_VERSION >= '6.0'"
        "IconType" => "IDEDownloadablesTypeDocSet"
        "Category" => "Documentation"
        "InstalledIfAllReceiptsArePresentOrNewer" => {
          "com.apple.pkg.7.0.iOSDocset" => "10.9.0.0.1.1405962775"
        }
        "Summary" => "My description of content"
      }
   }
   
   ...

It specifies the iOS 8.0 documentation available for download with Xcode 6.0.1.

The entry specifies

  • where the documentation can be downloaded from, the "source"field,

  • where it should be installed, the "InstallPrefix" field and

  • the criteria for deciding whether the documentation is installed, the "InstalledIfAllReceiptsArePresentOrNewer" field.


Copyright (c) 2014 By Simon Lewis. All Rights Reserved.

Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and owner Simon Lewis is strictly prohibited.

Excerpts and links may be used, provided that full and clear credit is given to Simon Lewis and justanapplication.wordpress.com with appropriate and specific direction to the original content.

Advertisements

1 Comment »

  1. […] the value of the "PackageVersion" entry meets the criteria for installation as expressed in the entry in the .dvtdownloadable index […]

    Pingback by The Arcane World Of Xcode 6.0 Downloadable DocSets: Part Three — Xcode 6.0.1 And The Invisible iOS 8.0 Documentation | Just An Application — September 19, 2014 @ 3:47 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: