Unrecognized Selector SenTestCase for Category

前端 未结 4 1788
没有蜡笔的小新
没有蜡笔的小新 2020-12-20 12:50

I created a new Cocoa Touch Static Library project with Unit Testing in XCode 4 and added a category:

// NSString+Inflections.h
@interface NSString (Inflect         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-20 13:29

    I can also confirm that adding the required files to the Test project's Build Phases > Compile Sources collection solves this problem. Thanks a bunch!

    When I tried the -all_load approach, however, I started to receive a bunch of errors, like that _CGSizeZero is undefined for architecture i386. It turns out that some code - like this one, where I use CGSizeZero in one of my classes - can make the second approach break.

    Once I replaced CGSizeZero with CGSizeMake(0, 0), however, the second approach worked great as well.

提交回复
热议问题