Sometimes you are stuck with linker errors that drive your mad while building for iOS using XCode ( using Unity3D ). This post will be a ever growing list of how I solved them 😀 :
Linker error with device info …
Undefined symbols for architecture armv7:]
"__GetNoTrackFlag", referenced from:
RegisterMonoModules() in RegisterMonoModules-DC9EF89F0E4F4A47.o
"__GetCFBundleID", referenced from:\
RegisterMonoModules() in RegisterMonoModules-DC9EF89F0E4F4A47.o\
ld: symbol(s) not found for architecture armv7\
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have noticed that even though DeviceInfo was present in Build Phase , It kept throwing this error.
- Delete the DeviceInfo bundle in Build Phase tab.
- Search for deviceInfo in your Unity Project ( do it from within the search box in Unity Editor and Show in Finder ) , usually found at “Assets/Plugins/iOS/DeviceInfo.framework”
- Drag and drop the bundle found in step 2 to the project .
Clean + build. And it should be all good !