当我在手机中运行UITest时,它会安装并作为一个单独的应用程序运行,同时给出以下错误。
10:44:33.892639+0700 XCTRunner11886:3502890运行测试.10:44:34.137927+0700 XCTRunner11886:3502890包“...UITests”无法加载,因为它被损坏或缺少必要的资源。试着重新安装包。2017年-07-27 10:44:34.137999+0700 XCTRunner11886:3502890
我正试图为这个问题找出一天多的解决办法。
我想将UITests添加到我现有的应用程序中,并将UITest目标添加到我的应用程序中。我用的是迦太基和可可豆。我更新了pod文件,更新了pod,然后将框架添加到由carthage安装的UITest目标中。
这是我的豆荚文件
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"我可以从堆栈溢出中找到相关的question,但不幸的是,它没有帮助。你能帮我把UITest目标添加到我的项目中吗?
发布于 2018-03-28 09:33:28
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
endinherit! :complete行是这里的关键
在设置中,UITest目标

NEXT
pod deintegrate && pod installhttps://stackoverflow.com/questions/45342243
复制相似问题