我最近更新了我的 SWIFT 应用程序 pod 文件,并且由于 firebase 版本现已更新到 5.2。
现在在获取设备实例 ID 时出现以下错误。
let tokenId = InstanceID.instanceID().token()
error: 使用未解析的标识符“InstanceID”
以前这段代码工作正常,我正在获取应用程序的实例 ID。
以下是我的 pod 文件的内容。
# 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
任何建议都会有帮助。
谢谢。
您应该导入 FirebaseInstanceID
import FirebaseInstanceID
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)