Cannot initialize a parameter of type 'id<NSCopying> _Nonnull' with an rvalue of type 'Class' error Unity ARKit Project

Hello, newbie here I am getting these errors while trying to build an Unity ARKit project from Xcode:

error: Cannot initialize a parameter of type 'id _Nonnull' with an rvalue of type 'Class'

Following is the code where the error points to:

code: [nativeSession->_classToCallbackMap setObject:anchorCallbacks forKey:[ARPlaneAnchor class]];

Add a Comment

Replies

Make sure to do it this way "NO SPACES IN BETWEEN" [nativeSession->_classToCallbackMap setObject:anchorCallbacks forKey:(id)[ARPlaneAnchor class]];