gpt4 book ai didi

ios - 在 xcode 7.3 : could not build Objective-C module 'libxml2' 上运行测试

转载 作者:行者123 更新时间:2023-11-30 13:30:17 25 4
gpt4 key购买 nike

我使用 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")
}
}

并使用这个库进行xml解析:https://github.com/tid-kijyun/Kanna

但是当我运行测试时,出现错误:

:0: error: could not build Objective-C module 'libxml2'

最佳答案

哦,我错过了添加 pods 文件库:

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

关于ios - 在 xcode 7.3 : could not build Objective-C module 'libxml2' 上运行测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36644571/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com