I have recently upgraded to XCode 6.3 and I am trying to initiate an ODQuery as per the Apple Documentation and getting an error.
'Int' is not convertible to 'ODMatchType'
I am using Apple's own Documentation Open Directory Programming Guide
Here is my Swift code:
var err:NSError?
var session = ODSession.defaultSession()
var node = ODNode(session: session, name: "/Local/Default", error: &err)
var query = ODQuery(node: node, forRecordTypes: kODRecordTypeUsers, attribute: kODAttributeTypeRecordType, matchType: kODMatchContains, queryValues: "darren", returnAttributes: kODAttributeTypeStandardOnly, maximumResults: 10, error: &err)?
The issue seems to be that kODMatchContains or any other matchType that are tried are not compatible with the Swift 1.2 function?
If someone knows what is going on or if you can try the code in 6.3 yourself and get the same results, please let me know.