简体   繁体   中英

how to use XCTestcase in static objc library

I'm trying to add a XCTestCase to a static library written in ObjC. But I get this errors

'XCTest/XCTest.h' file not found
Cannot find interface declaration for 'XCTestCase', superclass of 'MotwinTests'

I didn't understand why the XCTestCase is not found in my static library or maybe is not supported with static library?

在此处输入图片说明

在此处输入图片说明

after a long time stack on this problem, I came to figure out that it's a configuration problem related to search path in Build Setting of the my test target (search path = OCMockitoIOS and GHUnitTest). To solve the problem, I just cleared the search path as the following screen: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM