dyld: Symbol not found: _OBJC_CLASS_$_NSAttributedString

06 December 2011

Updating Xcode seemed to screw up my project (again). Firstly it set the deployment target for Max Astro to iOS 5.0 and I suspect it changed the linker settings for the project as well. At first I didn't notice, after all who runs an iOS 3.1.3 device!

When I did run it on my legacy iPod Touch with 3.1.3 installed (the max os it's allowed to run) I got this runtime linker error

dyld: Symbol not found: _OBJC_CLASS_$_NSAttributedString

Now this is probably obvious to some but after much googling I couldn't find the solution, it ran fine on my iPhone. The linker said that it expected to find NSAttributedString in the Foundation Framework. So I set the framework to weak linking ('optional' in the project Summary tab) and ran it on multiple devices. All was well again. I'm pretty sure Xcode screwed that up for me.... but it might have been me clicking around like a buffoon.

I'm writing this to seed google more than anything. Hope it helps someone out there :)

© Copyright Execution Unit Ltd 2012