I am working on multi target ios project in objective C. Some swift classes are also there by Bridging-header. There is a Unit test target for main target as Host application. I have to do unit test for another particular target [Say, SecondaryTarget]. I have added the "Unit test target" by Edit Scheme > Test to enable unit test. I am trying to import a existing class and do the unit test. But I am always getting reference issue [file not found] in test classes, while importing the classes.
Asked
Active
Viewed 78 times
0
-
So is the project a workspace, and the secondary target a framework? Are you working in a single unit test target, or did you create a second one for SecondaryTarget? – Jon Reid Aug 23 '20 at 19:41
-
@JonReid: Yes, I am using Cocoapods in my project. Secondary target is not a framework. Different targets are there for different customers. There is single Test target only. Need to do unit test for a single target [single customer]. – soham paul Aug 24 '20 at 17:10
1 Answers
0
I'm pretty sure you can't reuse the same test target against different apps. Instead, create a test target for each app. Share whatever test code you want across each test target.

Jon Reid
- 20,545
- 2
- 64
- 95