iOS - 'MyProject-Swift.h' file not found when running Unit Tests for Swift -
i trying setup unit testing project. existing objective-c app, have added 1 swift class to. have setup 'myproject-swift.h' , swift bridging files (both 'myproject' , 'myprojecttest') , able build , run app fine using both objective-c , swift code.
however, want run unit tests on new swift class. setup test file , looks following:
myswiftclasstests.swift:
import uikit import xctest import myproject class myswiftclasstests: xctestcase { override func setup() { super.setup() // set setup code here. method called before invocation of each test method in class. } override func teardown() { // set teardown code here. method called after invocation of each test method in class. super.teardown() } func testexample() { // illustration of functional test case. xctassert(true, "pass") } func testperformanceexample() { // illustration of performance test case. self.measureblock() { // set code want measure time of here. } } }
i error when running app test:
'myproject-swift.h' file not found
i not sure why happens when trying run tests. suggestions?
"myproject-swift.h" file generated @ next path:
"$(target_temp_dir)/../$(project_name).build/derivedsources"
i end adding header search paths unit test target.
also @hyouuu pointed out beingness known issue, apple provide solution @ end. until believe need utilize above solution.
https://developer.apple.com/library/mac/releasenotes/developertools/rn-xcode/chapters/xc6_release_notes.html
ios unit-testing swift header
No comments:
Post a Comment