无法调用非功能类型模块的值< Firebase>' [英] Cannot call value of non-function type 'module<Firebase>'
本文介绍了无法调用非功能类型模块的值< Firebase>'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我试图启动Fire基地设置ref地址为它在这里使用此代码
let BASE_URL =YOUR_FIREBASE_URL
var FIREBASE_REF = Firebase(url:BASE_URL)
$ c
$ b ,它显示一个错误:
无法调用非功能类型模块的值< Firebase>'
我的pod文件看起来像这样:
#取消注释此行为您的项目定义全局平台
#platform:ios,'9.0'
target'Mission Board'do
#如果你不使用Swift并且不想使用动态框架,请注意这一行
use_frameworks!
pod'Firebase','> = 2.4.2'
end
环境:
Xcode 7.3.1(7D1014)
直接从官方网站Firebase。
Swift语言
请有人帮忙吗?
解决方案我的pod文件如下所示:
platform:ios,'9.2'
use_frameworks!
target'firebaseWithChris'do
pod'Firebase'
pod'Firebase / Database'
end
$ / $ p
$ p $ x
$而不是
var rootRef = Firebase(url:https://< YOUR-FIREBASE-APP> .firebaseio .com)
try
<$ p $ ()
var rootRef = FIRDatabase.database()。reference()
$ b 为我工作:]
i have a strange error when i was using firebase from google.
when i trying to init the Fire base setup the ref address for it using this code here
let BASE_URL = "YOUR_FIREBASE_URL"
var FIREBASE_REF = Firebase(url: BASE_URL)
, it shows an error:
Cannot call value of non-function type 'module<Firebase>'
my pod file looks like this:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'Mission Board' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase', '>=2.4.2'
end
Environment:
Xcode 7.3.1 (7D1014)
Firebase straight from the official site.
Swift language.
please anyone help ?
解决方案 My pod file looks like this :
platform :ios, ‘9.2’
use_frameworks!
target 'firebaseWithChris' do
pod 'Firebase'
pod 'Firebase/Database'
end
Xcode:in viewController.swift file in viewDidLoad method
instead of
var rootRef = Firebase(url:"https://<YOUR-FIREBASE-APP>.firebaseio.com")
try
var rootRef = FIRDatabase.database().reference()
This worked for me :]
这篇关于无法调用非功能类型模块的值< Firebase>'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文