Conditional directive in DocC for different platforms

162 Views Asked by At

Using DocC to document a swift package, is there a way to have conditional sections depending on whether you compile for iOS or macOS ?

My problem is the following ; in a package, I have a symbol that is only valid while on macOS. If I refer to that symbol in a DocC article (using ``Symbol``) I get a warning when compiling for iOS ("Topic reference 'Symbol' couldn't be resolved to known documentation").

Not a big deal, but I hate leave warnings alive...

Edit: besides, the warning propagates to all apps that use the package...

0

There are 0 best solutions below