Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues about "ARPlaneAnchor" and "ARAnchor" in ARSessionNative.mm when building Mapbox Unity project in XCode #1839

Open
liu550 opened this issue Jan 11, 2022 · 0 comments

Comments

@liu550
Copy link

liu550 commented Jan 11, 2022

Note: If this is a bug or support ticket, please provide the following information:

  • Unity version: 2019.4.23f1
  • Mapbox SDK version: Unity SDK v2.1.1
  • The platform you're building to: iOS (iPhone only)
  • A description of what you're trying to do: I am trying to use Mapbox's Unity SDK and Niantic's Lightship SDK to build a location-based AR application. Before building this project, I tested building a project with only Lightship SDK and it worked fined on my iPhone. Then I duplicated the project and imported Mapbox's Unity SDK v2.1.1 into it. Regarding the player settings, I set the target device as "iPhone Only" and the target minimum iOS version as 11.0, the minimum requirement of using Lightship SDK. The entire Mapbox Unity SDK was imported and built, and the XCode project was successfully created by Unity with no errors. However, when building the project in XCode, I got the error
Cannot initialize a parameter of type 'id<NSCopying> _Nonnull' with an rvalue of type 'Class'

for the following two lines of code in ARSessionNative.mm

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

I followed the suggestions here (facebook/FBRetainCycleDetector#115) by adding (id) or (id<NSCopying>) before ARPlaneAnchor and ARAnchor, which led to the new errors:

Unexpected interface name 'ARPlaneAnchor': expected expression

and

Unexpected interface name 'ARAnchor': expected expression

Appreciate any clues on how I may resolve the issues!

  • Steps to recreate the bug if appropriate: As described above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant