Unity 3.5.2 Linker error

After updating to Unity 3.5.2 I get the following errors when building for xcode:

Undefined symbols for architecture armv7:
“__Z14UnityGetGLViewv”, referenced from:
-[iPhoneADBannerViewDelegate bannerViewDidLoadAd:] in libiPhone-lib.a(iAd.o)
_ZN6iphone20OnProcessTouchEventsEP5NSSetS1 in libiPhone-lib.a(iPhoneInputImpl.o)
__Z20ShowOnScreenKeyboardmbbbbRKSs in libiPhone-lib.a(iPhoneKeyboard.o)
-[KeyboardDelegate keyboardDidChangeFrame:] in libiPhone-lib.a(iPhoneKeyboard.o)
-[MoviePlayerContext moviePreloadDidFinish:] in libiPhone-lib.a(iPhoneVideo.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Undefined symbols for architecture armv6:
“__Z14UnityGetGLViewv”, referenced from:
-[iPhoneADBannerViewDelegate bannerViewDidLoadAd:] in libiPhone-lib.a(iAd.o)
_ZN6iphone20OnProcessTouchEventsEP5NSSetS1 in libiPhone-lib.a(iPhoneInputImpl.o)
__Z20ShowOnScreenKeyboardmbbbbRKSs in libiPhone-lib.a(iPhoneKeyboard.o)
-[KeyboardDelegate keyboardDidChangeFrame:] in libiPhone-lib.a(iPhoneKeyboard.o)
-[MoviePlayerContext moviePreloadDidFinish:] in libiPhone-lib.a(iPhoneVideo.o)
ld: symbol(s) not found for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Anyone having the same issue or a way to solve it?

Thanks

You have to rebuild to a new folder. I know it’s a pain, but that’s what worked for me. Then I just copied my custom classes and AppController . mm changes into the new xcode project, and it worked like a charm.

I had the same problem, even after recreating the Xcode project several times. The only files I copied over were some asset bundles, Info.plist, localization files and the AppController.mm. The problem was the AppController.mm:

Instead of replacing the whole file, manually copying over the custom code into the new generated file, did solve the problem for me. Would be interesting to know, which part of the code it is, since it might be a simpler solution, when having a lot of custom code in the AppController.mm

Tried to build to target ios 3.1.3 and also 5.0 and i’m using xcode 4.2