Firebase InstanceId无法解析的标识符swift4 [英] Firebase InstanceId unresolved identifier swift4
本文介绍了Firebase InstanceId无法解析的标识符swift4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近更新了我的SWIFT应用程序pod文件,由于该Firebase版本现在已更新为5.2. 现在,在获取设备实例ID时出现以下错误.
I have recently updated My SWIFT applications pod file, And because of that firebase version is now updated to a 5.2. Which now gives me following error while getting a device instance id.
let tokenId = InstanceID.instanceID().token()
错误:使用未解决的标识符"InstanceID"
以前,此代码运行正常,并且我正在获取应用程序的实例ID.
Previously this code was working fine and I was getting Application's Instance Id.
以下是我的pod文件的内容.
Following is content of my pod file.
# Uncomment the next line to define a global platform for your project
# platform :ios, '11.2'
target 'FirebaseChat' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for FirebaseChat
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'UnderLineTextField', '~> 2.0'
pod 'Alamofire'
pod 'TCPickerView'
pod 'Toast-Swift', '~> 3.0.1'
pod 'IQKeyboardManagerSwift'
end
任何建议都会有所帮助. 谢谢.
Any suggestions will be helpful. Thank You.
推荐答案
您应该导入FirebaseInstanceID
You should import FirebaseInstanceID
import FirebaseInstanceID
这篇关于Firebase InstanceId无法解析的标识符swift4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文