I've set SWIFT_VERSION to 4.2 for the Graph pod but when compiling my workspace I get the following error in ManagedNode.swift line 55:
Incorrect argument label in call (have 'stringInterpolationSegment:', expected '_cocoaString:')
The code in question is below. Apple documentation indicates that String(stringInterpolationSegment: should not be called directly. I tried amending the parameter as the error suggested but that just caused a runtime crash. I'm not clear what this code is trying to achieve exactly so can't recommend how to fix it. There's obviously something subtle going on as otherwise why not just use "(self.nodeClass)" instead? ( I tried changing the code to that too but caused runtime crash too).
guard let moc = managedObjectContext else {
fatalError("[Graph Error: Cannot obtain permanent objectID]")
}
var result: String?
moc.performAndWait { [unowned self, unowned moc] in
do {
try moc.obtainPermanentIDs(for: [self])
} catch let e as NSError {
fatalError("[Graph Error: Cannot obtain permanent objectID - \(e.localizedDescription)]")
}
result = String(stringInterpolationSegment: self.nodeClass) + self.type + self.objectID.uriRepresentation().lastPathComponent
}
return result!
}
I've set SWIFT_VERSION to 4.2 for the Graph pod but when compiling my workspace I get the following error in ManagedNode.swift line 55:
Incorrect argument label in call (have 'stringInterpolationSegment:', expected '_cocoaString:')
The code in question is below. Apple documentation indicates that
String(stringInterpolationSegment:
should not be called directly. I tried amending the parameter as the error suggested but that just caused a runtime crash. I'm not clear what this code is trying to achieve exactly so can't recommend how to fix it. There's obviously something subtle going on as otherwise why not just use "(self.nodeClass)" instead? ( I tried changing the code to that too but caused runtime crash too).