Search code examples
swiftxcodecocoapodsdocc

DocC documentation archive not recognised by Xcode in a CocoaPod


While developing the internal project for a CocoaPod, I can successfully add a .docc documentation archive, build documentation and see the changes reflected in the Xcode documentation viewer. However, when I include the pod in another project (and run pod install), the documentation archive is treated as a normal folder and its customisations are not reflected when building documentation. From the icon, it looks like Xcode does not recognise it:

The pod's internal project directory The pod's directory inside the project that installed it
Xcode directory list with "DoccDemo.docc" folder displaying a special bookshelf icon. Xcode directory list with "DoccDemo.docc" folder displaying standard folder icon.

Am I doing something wrong?


Solution

  • Looks like Cocoapods does not currently support DocC and will incorrectly build the pods project, treating the .docc directory as a normal folder. A fix has been submitted and looks like it will be included in the next version (1.12.0).

    Edit: Version 1.12.0 has been released including the fix for this issue!