The idea is to make it easer to update documentation when API changes or when code is not correct.
Is it possible to make the code file declared like this:
@Code(name: "AppDelegate.swift", file: AppDelegate.swift)
And the content of the AppDelegate.swift
file is:
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
compiler error should be raised here
return true
}
}
After doing "Product > Build Documentation" the output gives the following documentation and there is not warning or errors during the build:
Thank you for your answers.