我正在尝试在我的应用程序中运行 UI 测试,但是一旦模拟器启动,我就会得到:
\n\n无法加载捆绑包 \xe2\x80\x9cAppUITests\xe2\x80\x9d,因为它已损坏或缺少必要的资源。尝试重新安装捆绑包。
\n\n2018-10-05 11:04:59.772078-0500 AppUITests-Runner [53273:1645870](dlopen_preflight(/Users/John/Library/Developer/Xcode/DerivedData/app-ios-client-ewtlrcqcxoeiaudgmthymuhcuxfz/Build/Products/Debug- iphonesimulator/AppUITests-Runner.app/PlugIns/AppUITests.xctest/AppUITests):未加载库:@rpath/libswiftSwiftOnoneSupport.dylib\n 引用自:/Users/John/Library/Developer/Xcode/DerivedData/app-ios-client -ewtlrcqcxoeiaudgmthymuhcuxfz/Build/Products/Debug-iphonesimulator/AppUITests-Runner.app/PlugIns/AppUITests.xctest/Frameworks/Alamofire.framework/Alamofire\n 原因:未找到图像)
\n\n我的 UITest 是由 Xcode 10 创建的模板,我使用 Cocoapods 1.5.3 和 Swift 4.2
\n\n我的项目结构:
\n\n我的 podfile 看起来像这样:
\n\nplatform :ios, '10.0'\n\ninhibit_all_warnings!\nuse_frameworks!\n\ntarget 'App Library' do\n use_frameworks!\n\n pod 'Intercom'\n pod 'Spreedly'\n pod 'Alamofire'\n pod 'IGListKit'\n pod 'CardIO'\n pod 'SwiftKeychainWrapper'\n pod 'OneTimePassword', :git => 'https://github.com/john/OneTimePassword.git', :branch => 'develop'\n pod 'SnapKit'\n pod 'DateToolsSwift'\n pod …Run Code Online (Sandbox Code Playgroud)