I'm attempting to use the latest release of the sdk in Swift, working with cloud anchors. When attempting to extend my anchor manager class and inherit from the GARSessionDelegate class, I get the following warning from Xcode:
Cannot declare conformance to 'NSObjectProtocol' in Swift; 'CloudAnchorManager' should inherit 'NSObject' instead
The only fix in this situation, to my knowledge, would be to implement the missing methods from the NSObjectProtocol. Is this intended functionality, or am I using this improperly? My current implementation looks like this:
extension CloudAnchorManager: GARSessionDelegate {
func session(_ session: GARSession, didHost anchor: GARAnchor) {
print("Anchor hosted successfully. Cloud ID: \(anchor.cloudIdentifier)")
// Do something with hosted anchor here
}
}
Would appreciate any feedback or insight with this, thanks!
Hi all,
I'm attempting to use the latest release of the sdk in Swift, working with cloud anchors. When attempting to extend my anchor manager class and inherit from the GARSessionDelegate class, I get the following warning from Xcode:
Cannot declare conformance to 'NSObjectProtocol' in Swift; 'CloudAnchorManager' should inherit 'NSObject' instead
The only fix in this situation, to my knowledge, would be to implement the missing methods from the NSObjectProtocol. Is this intended functionality, or am I using this improperly? My current implementation looks like this:
Would appreciate any feedback or insight with this, thanks!