Hi, I am working on a visionOS Swift Package.
I'm trying to generate the documentation for preview and export with the following commands, however I keep getting the error:
/Users/chris/myfile.swift:6:8: error: no such module 'UIKit' import UIKit
- I'm using UIKit for a color variable.
My Package has:
...
platforms: [.visionOS(.v1)]
...
Failing Commands:
swift package --disable-sandbox preview-documentation
and
PACKAGE_NAME=packageName
REPOSITORY_NAME=repoName
OUTPUT_PATH=./docs
swift package --allow-writing-to-directory $OUTPUT_PATH \
generate-documentation --target $PACKAGE_NAME \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path $REPOSITORY_NAME \
--output-path $OUTPUT_PATH
The documentation does build if I build it from within Xcode's Product->Build Documentation menu
Does anyone have any ideas what's wrong here?