Автоматическое тестирование Cocoapods iOS в Xcode 10.1 - PullRequest
0 голосов
/ 23 ноября 2018

Я все перепробовал в Google, но не могу решить эту ошибку.Обычная сборка работает, но тесты пользовательского интерфейса всегда терпят неудачу с этой ошибкой.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() {
    }
}

Podfile

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)
...