Using El Capitan and XCode 7, the following trivial snippet of code causes a Swift related exception to be thrown:
func openDocument(sender: AnyObject?) {
let panel = NSOpenPanel();
let types = [ "abc", "def" ]
panel.allowedFileTypes = types;
panel.runModal();
}
The exception is "[Swift._SwiftDeferredNSArray supportsSecureCoding]: unrecognized selector sent to class 0x1002de2c0". And it is triggered when assigning types to allowedFileTypes.