在转换为swift之后,Tests.swift文件中没有这样的模块“Firebase”3 [英] No such a module 'Firebase' in Tests.swift file after Converting to swift 3

查看:403
本文介绍了在转换为swift之后,Tests.swift文件中没有这样的模块“Firebase”3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 没有这样的模块'Firebase'
命令/ usr / bin / ditto失败,代码为1

我必须更新Firebase框架?为什么发生这种情况?



*应用程序仍在运行!



以下是pod文件:

 #取消注释此行为您的项目定义全球平台
#platform:ios,'9.0'

use_frameworks!

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


解决方案

使用 Cocoapods 作为 TheTestingApp ,您只需添加这些或 Cocoapods 您也可以使用 TheTestingAppTest

同时清理您的项目: CMD + SHIFT + K ,然后运行 pod install &然后运行你的应用。



类似于: - $ / $>

  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


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

解决方案

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

这篇关于在转换为swift之后,Tests.swift文件中没有这样的模块“Firebase”3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆