Apple DocC "BUILD DOCUMENTATION FAILED"

573 Views Asked by At

I'm trying to run xcodebuild docbuild using the following command to generate an Apple DocC .docarchive:

xcodebuild docbuild -sdk iphoneos -project MyProject.xcodeproj -scheme MyProject -derivedDataPath ~/Desktop/MyProjectDocC

The problem is with the NotificationServiceExtension module, as it fails the process with this error:

The following build commands failed:
SwiftEmitModule normal arm64 Emitting\ module\ for\ NotificationServiceExtension (in target 'NotificationServiceExtension' from project 'MyProject')
(1 failure)

Is there a way to exclude the NotificationServiceExtension module from building?

It's ok when it comes to Xcode and

Product > Build Documentation

The problem appears in command-line.

I tried --exclude='./NotificationServiceExtension', but that didn't work.

This command didn't work either:

xcodebuild docbuild -scheme MyProject -derivedDataPath ~/MyProjectBuild -destination 'platform=iOS Simulator,name=iPhone 12'
0

There are 0 best solutions below