在unit test 裡面會發現compile 會出現 Failled to import bridging header
會發現 unit test 的bridging header是空白的
這時只要copy 主專案中的 Objective-C Bridging Header裡的file name
到unit test target 裡對應的Objective-C Bridging Header即可
-------------
另外,有用到CocoaPods的話
1.PodFile需要將UITests搬到最外層
2.Unit test target跟main project一樣要有同樣的pod 套件(有定義一個shared function),然後需有inherit! :search_paths
全站熱搜
留言列表