Error in linking of a static iOS framework to both app's and XCTest targets
问题 I have an app which has Objective-C and Swift combined. It has an XCTest target. I have a static framework written in Objective-C which is linked to a main target and is used by main target and test target. I have tested 3 different cases, in which two of them compile but with warnings, while I want to see no warnings when I run my tests: 1) Static framework is not linked to test target (via Link Binary With Libraries ), but is included to the test target's Framework search paths . The test