小编Lal*_*alo的帖子

Xcode 10 UI 测试原因:Cocoapods 找不到图像

我正在尝试在我的应用程序中运行 UI 测试,但是一旦模拟器启动,我就会得到:

\n\n

无法加载捆绑包 \xe2\x80\x9cAppUITests\xe2\x80\x9d,因为它已损坏或缺少必要的资源。尝试重新安装捆绑包。

\n\n

2018-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
    \n
  • 工作区\n\n
      \n
    • 自定义框架(Podfile 在这里)
    • \n
    • 应用程序 A(这里我运行 UITests)
    • \n
    • 应用程序B
    • \n
  • \n
\n\n

我的 podfile 看起来像这样:

\n\n
platform :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)

xcode ios cocoapods swift xcode-ui-testing

3
推荐指数
1
解决办法
2677
查看次数

标签 统计

cocoapods ×1

ios ×1

swift ×1

xcode ×1

xcode-ui-testing ×1