I’ve been banging my head on the wall for several days, but despite several Google / SO / Github searches, I can’t find a solution to the problems I have.
All I'm trying to do is create some unit tests for my application that use Firebase modules.
I am using Xcode 7.3.1 and Cocoapods 1.0.1. Update: The problem remains with Xcode 8.0
With this podfile:
platform :ios, '9.0' use_frameworks! inhibit_all_warnings! target 'MyApp' do pod 'Firebase' pod 'Firebase/Auth' pod 'Firebase/Database' pod 'Firebase/Storage' target 'MyAppTests' do inherit! :search_paths end end
In my XCTest class, I get
Missing required Firebase module
error with @testable import MyApp
Alternatively with this podfile:
platform :ios, '9.0' use_frameworks! inhibit_all_warnings! def common_pods pod 'SwiftyTimer' pod 'Firebase' pod 'Firebase/Auth' pod 'Firebase/Database' pod 'Firebase/Storage' end target 'MyApp' do common_pods end target 'MyAppTests' do common_pods end
Tests are being built, but my console is littered with warnings, for example:
The <-FirebaseClassName-> class is implemented as in ... MyApp ... and ... MyAppTests ... One of the two will be used. Which one is undefined
ios unit-testing xcode cocoapods xctest
doovers Jul 06 '16 at 3:54 on 2016-07-06 03:54
source share