I'm developing a macOS document-based app in Swift, using Xcode 11.6 and the template it provides. I often use Swift print() statements during development to see what's going on as the app runs. But when I try to put one of these in the Document.swift template file, I get errors:
Cannot convert value of type 'String' to expected argument type '[NSPrintInfo.AttributeKey : Any]'
Missing argument label 'withSettings:' in call
Missing arguments for parameters 'showPrintPanel', 'delegate', 'didPrint', 'contextInfo' in call
I don't get these errors when I put a print() statement in the AppDelegate.swift or ViewController.swift files. Can someone tell me what the problem is here?
Cannot convert value of type 'String' to expected argument type '[NSPrintInfo.AttributeKey : Any]'
Missing argument label 'withSettings:' in call
Missing arguments for parameters 'showPrintPanel', 'delegate', 'didPrint', 'contextInfo' in call
I don't get these errors when I put a print() statement in the AppDelegate.swift or ViewController.swift files. Can someone tell me what the problem is here?