简体   繁体   English

在xcode 7.3上运行测试:无法构建Objective-C模块'libxml2'

[英]Run tests on xcode 7.3 : could not build Objective-C module 'libxml2'

I create a simple test class on swift 2.0 with xcode 7.3: 我使用xcode 7.3在swift 2.0上创建了一个简单的测试类:

import XCTest
@testable import MyTestProject

class ChangeWishListTests: XCTestCase {

    func testViewLoad() {
        let changeWishListVC = ChangeWishListViewController()
        changeWishListVC.viewDidLoad()

        XCTAssert(changeWishListVC.view != nil, "Passed")
    }        
}

And use this library for xml parsing: https://github.com/tid-kijyun/Kanna 并将此库用于xml解析: https : //github.com/tid-kijyun/Kanna

But when i run tests, i get error: 但是当我运行测试时,出现错误:

:0: error: could not build Objective-C module 'libxml2' :0:错误:无法构建Objective-C模块“ libxml2”

Oh, i missed to add in pods file libraries: 哦,我想添加Pod文件库:

target 'MyProjectTests' do
pod 'Kanna', '~> 1.0.0'
end

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM