Search code examples
iosswiftfirebaseswift3cocoapods

No such a module 'Firebase' in Tests.swift file after Converting to swift 3


After I converted the project to swift 3 I'm getting this error in Test.swift file:

No such module 'Firebase'
Command/usr/bin/ditto failed with code 1 

is that mean I have to update the firebase framework? Why that happened?

*The application still runs though!

*Here's the pod file:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

use_frameworks!

target 'TheTestingApp' do
pod 'Firebase' 
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
end

Solution

  • The issue is you are using the mentioned Cocoapods for TheTestingApp only you also need to add these or the Cocoapods you wanna use for the TheTestingAppTest

    Also Clean your project : - CMD+SHIFT+K, Then run pod install & then run your app.

    Something like this:-

    use_frameworks!
    
    target 'TheTestingApp' do
    
        pod 'Firebase' 
        pod 'Firebase/Auth'
        pod 'Firebase/Database'
        pod 'Firebase/Storage'
    
    end
    
    target 'TheTestingAppTests' do
    
        pod 'Firebase' 
        pod 'Firebase/Auth'
        pod 'Firebase/Database'
        pod 'Firebase/Storage'
    
    end