Ios 无法加载UITest捆绑包

Ios 无法加载UITest捆绑包,ios,swift,swift3,Ios,Swift,Swift3,当我在手机上运行UITest时,它会作为一个单独的应用程序安装和运行,同时会出现以下错误 2017-07-27 10:44:33.892639+0700XCTRUNNER[11886:3502890]正在运行 测验。。。2017-07-27 10:44:34.137927+0700XCTRUNNER[11886:3502890] 无法加载捆绑包“…UITests”,因为它已损坏或丢失 缺少必要的资源。尝试重新安装捆绑包。2017-07-27 10:44:34.137999+0700 XCTRun

当我在手机上运行UITest时,它会作为一个单独的应用程序安装和运行,同时会出现以下错误

2017-07-27 10:44:33.892639+0700XCTRUNNER[11886:3502890]正在运行 测验。。。2017-07-27 10:44:34.137927+0700XCTRUNNER[11886:3502890] 无法加载捆绑包“…UITests”,因为它已损坏或丢失 缺少必要的资源。尝试重新安装捆绑包。2017-07-27 10:44:34.137999+0700 XCTRunner[11886:3502890] (dlopen_飞行前(/var/containers/Bundle/Application/75C9B589-CCD4-480D-9E23-BA86878E8B37/…UITests Runner.app/PlugIns/…UITests.xTest/…UITests): 未加载库: @参考rpath/GoogleToolboxForMac.framework/GoogleToolboxForMac 发件人: /var/containers/Bundle/Application/75C9B589-CCD4-480D-9E23-BA86878E8B37/…UITests Runner.app/PlugIns/…UITests.xTest/…UITests 原因:未找到图像)

我一天多来一直在努力寻找解决这个问题的办法

我想将UITest添加到我现有的应用程序中,并将UITest目标添加到我的应用程序中。我同时使用迦太基和可可荚。我更新了pod文件并更新了pod,然后我向UITest目标添加了框架,这些框架由迦太基安装

这是我的pod文件

platform :ios, '9.0'
use_frameworks!

target 'ExampleApp' do
    pod 'Charts'
    pod 'ReachabilitySwift', '~> 3'
    pod 'Fabric'
    pod 'Crashlytics'
    pod 'Google/Analytics'
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
end

target 'ExampleAppTests' do
    pod 'Charts'
    pod 'ReachabilitySwift', '~> 3'
    pod 'Fabric'
    pod 'Crashlytics'
end

target 'ExampleAppUITests' do
    pod 'Charts'
    pod 'ReachabilitySwift', '~> 3'
    pod 'Fabric'
    pod 'Crashlytics'
end
这是我的档案

github "Alamofire/Alamofire" ~> 4.0
github "SwiftyJSON/SwiftyJSON" "3.0.0"
github "Friend-LGA/LGSideMenuController" ~> 1.0.0
github "TTTAttributedLabel/TTTAttributedLabel" ~> 1.13.4
github "MagicalPanda/MagicalRecord"

我可以从堆栈溢出中找到一个相关的错误,但不幸的是,它没有帮助。你能帮我把UITest目标添加到我的项目中吗

Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
use_frameworks!

def base_pods
    pod 'FBSDKCoreKit', '4.24.0'
    pod 'FBSDKLoginKit', '4.24.0'
    pod 'FBSDKShareKit', '4.15.0'
    pod 'FacebookCore', '0.2.0'
    pod 'FacebookLogin', '0.2.0'
    pod 'FacebookShare', '0.2.0'
end
target 'App' do
  base_pods
    target 'AppTests' do
        inherit! :search_paths
        # Pods for testing
    end

    target 'AppUITests' do
        inherit! :complete
        # Pods for UI testing
    end
end
inherit!:完整
是此处的关键

在UITest目标的设置中

下一步

  • 清除派生数据
  • pod去集成和安装&pod

遇到了同样的问题。你弄明白了吗?