You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to import #import <Charts/Charts-Swift.h> in header file. It works well in the running mode before adding test target. But after adding test target to my project and trying to build my project in the testing mode, it tells me that 'Charts/Charts-Swift.h' file not found.
Adding frameworks to unit tests or a framework
Using Carthage for the dependencies of any arbitrary target is fairly similar to using Carthage for an application. The main difference lies in how the frameworks are actually set up and linked in Xcode.
Because unit test targets are missing the Linked Frameworks and Libraries section in their General settings tab, you must instead drag the built frameworks to the Link Binaries With Libraries build phase.
In the Test target under the Build Settings tab, add @loader_path/Frameworks to the Runpath Search Paths if it isn't already present.
In rare cases, you may want to also copy each dependency into the build product (e.g., to embed dependencies within the outer framework, or make sure dependencies are present in a test bundle). To do this, create a new Copy Files build phase with the Frameworks destination, then add the framework reference there as well. You shouldn't use the carthage copy-frameworks command since test bundles don't need frameworks stripped, and running concurrent instances of copy-frameworks (with parallel builds turn on) is not supported.
I'm trying to import #import <Charts/Charts-Swift.h> in header file. It works well in the running mode before adding test target. But after adding test target to my project and trying to build my project in the testing mode, it tells me that 'Charts/Charts-Swift.h' file not found.
Charts Environment
**Charts version/Branch/Commit Number: 3.1.1
**Xcode version:9.3
**Swift version:4.1
**Platform(s) running Charts: iOS
**macOS version running Xcode: 10.13.2
The text was updated successfully, but these errors were encountered: