'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 1:[1]

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).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Amja