Hey so I’m having a problem building my app in xCode. It only started happening recently and I have no idea why I’m getting this specific error since nothing I changed would really relate to this. I was able to build fine up until the point I imported either DoTween or Easy Save into my project the funny thing is though I can remove both of them and do a completely clean build and it will still give me this error. After doing something I’m not sure of I can do a completely clean build again and it works. When I re-import either of them it will start giving me this error again. I’ve not being able to figure out exactly what causes it since removing them and doing a clean build doesn’t always help. And I’m not always able to replicate the problem. Obviously there is something going on but I’m not sure what fixes it and I would like to use these two assets in my project.
The error is this
Undefined symbols for architecture arm64:
"void RegisterClass<PreviewAnimationClip>()", referenced from:
RegisterAllClasses() in UnityClassRegistration.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Did you ever find a solution to this? I am experiencing the same issue with my project when deploying to my iPhone from XCode. I am also using Easy Save and starting getting the error after updating Unity to 2018.1.5f1 from a 2017 version.
Yes it was exactly easy save that was causing the issue for me. So after a lot of heart ache I found that easy save automatically creates an object in the hierarchy. You can disable Easy save from doing this but be sure to also delete that object. Even if you delete Easy Save and none of the scripts actually execute for whatever reason that object existing will cause this error.
So in Easy Save->Settings you’ll see an option for “Auto Add Manager To Scene” disable this then find the gameobject that should be named “Easy Save 3 Manager” and delete that from the scene. Let me know if it works for you it was a very unusual issue to try and debug.
Thanks Barabicus! Just in case anyone else comes across this issue, I also found that unchecking “Strip Engine Code” in the iOS settings (under Other Settings->Optimization) also worked for me. It seems like a less than ideal solution but I figured I would mention it for reference.