Xcode error when attempting to build project
alyazyah opened this issue · 3 comments
My project is successfully running on Unity, but I run into an issue when I try to compile on Xcode. I get the following error:
/Libraries/Plugins/NativeCamera/iOS/NativeCamera.mm:120:25: Incompatible pointer types assigning to 'id<UINavigationControllerDelegate,UIImagePickerControllerDelegate> _Nullable' from 'Class'
Unity version 2020.1.8f1
iPhone 8+ running iOS 14.4.1, Xcode version 12.5
Is there a way to fix this? Thank you!
I'd recommend you to delete the plugin completely and reimport the latest version from GitHub or Asset Store. If, for some reason, this is not an option for you, you can change the problematic line to imagePicker.delegate = (id) self;
.
I also had the same error. I reimported the latest version of the asset but still had the same issue. Putting (id) before self fixed the issue
There seems to be some sort of Asset Store cache issue when Package Manager is used. I don't know if Unity is aware of that. (P.S. related forum thread)
If you encounter the issue, download the latest version from GitHub until Unity fixes the Package Manager issue.