我已经在Google上尝试了所有方法,但无法解决此错误。常规的构建工作正常,但UI测试始终会因该错误而失败。 https://github.com/CocoaPods/CocoaPods/issues/5250 https://github.com/CocoaPods/CocoaPods/issues/4752 我已经尝试了此链接上的所有内容。
import XCTest
class appUITests: XCTestCase {
override func setUp() {
super.setUp()
continueAfterFailure = false
XCUIApplication().launch()
}
override func tearDown() {
super.tearDown()
}
func testExample() {
}
}
project 'app.xcodeproj'
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0.1'
target 'app' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
# Pods for app
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'ProjectOxfordFace'
target 'appTests' do
inherit! :search_paths
# Pods for testing
pod 'Firebase'
end
target 'appUITests' do
inherit! :search_paths
# Pods for testing
pod 'Firebase'
end
end
2018-11-22 18:25:33.009865-0800 appUITests-Runner[41105:413196] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2018-11-22 18:25:33.102287-0800 appUITests-Runner[41105:413196] Running tests...
2018-11-22 18:25:33.137776-0800 appUITests-Runner[41105:413196] The bundle “appUITests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2018-11-22 18:25:33.137977-0800 appUITests-Runner[41105:413196] (dlopen_preflight(/Users/jiungc/Library/Developer/Xcode/DerivedData/app-bwethpghnvfnbscsaryseqcarpwt/Build/Products/Debug-iphonesimulator/appUITests-Runner.app/PlugIns/appUITests.xctest/appUITests): Library not loaded: @rpath/GTMSessionFetcher.framework/GTMSessionFetcher
Referenced from: /Users/jiungc/Library/Developer/Xcode/DerivedData/app-bwethpghnvfnbscsaryseqcarpwt/Build/Products/Debug-iphonesimulator/appUITests-Runner.app/PlugIns/appUITests.xctest/appUITests
Reason: image not found)