I want to use objective C class in my swift tests.
I get 'Use of undeclared type 'SySearchProductRequest'' error while trying to use the class. SySearchProductRequest is the objc class I want to use.
I am using @testable import Mymodulename to import my module which has this class, in tests.
I am stuck with an approach of writing objc test cases, which I don't want to do. Is there a way or is there something I am doing wrong or missing to make this work.
Just check if your class is added to Test Targets in Target Membership in File Inspector Example Screenshot . and Then Build the project again . Hope It removes the error .
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.