iphone - Method from a category throws an exception after upgrade to Xcode 4.2/iOS 5 -
i have category extends nsmutablearray
shuffle method. category declared , implemented in .h
file, included .pch
file. worked fine on ios 3.xx , 4.xx. installed xcode 4.2 yesterday. recompiled app base sdk set 5.0 , deployment target 3.2 throws -[__nsarraym shuffle]: unrecognized selector sent instance ...
i tried iphone 5.0 simulator, ipad 5.0 simulator, iphone 4g ios 5 - no difference.
now, if move declaration/implementation .m
class sends shuffle
message implemented app runs fine. original .h
imported - if copy code original .h
.m
compiler complains duplicate declaration.
the upgrade xcode 4.2 caused compiler change gcc apple llvm. , llvm not implementation in .pch. extracting implementation .m file, importing original .h directly, compiling gcc solve problem.
Comments
Post a Comment