ios - 为什么我的“let =”值与我的快照值不同?
问题描述
我正在尝试为 fcm 推送通知实现 id/token。我将 id/token 存储在我的 firebase 数据库中。我在获取常量值以匹配快照值时遇到问题。这是代码和图片。[![在此处输入图片描述][1]][1]
let database = self.ref.child("\(safetyEmail)").child("uid")
let otherUseruid = database.observe(.value) { snapshot in
guard let ouid = snapshot.value as? String else {
return
}
print("this is the ouid: \(ouid)")
}
print("this is the otherUseriD: \(otherUseruid)")
什么是 otherUseruid 与 ouid 不同的值?
解决方案
推荐阅读
- python - Django 错误跟随教程 b/c 使用 3.1 而不是 1.9 TypeError: view must be a callable or a list/tuple in the case of include()
- postgresql - 不重复非递归项的递归查询
- angular - mfp中范围元素中的安全检查有什么关系?
- zend-framework - 列不能为空,但已填充
- javascript - 调用绘图函数次数过多时的 HTML 画布限制?
- reactjs - 将 React-Redux 与 Microsoft Fluid 框架集成
- sql-server - 在供应商的链接服务器数据库表上获取插入的行(无法创建触发器)
- visual-studio - 在 Visual Studio 中运行将 exe 作为预构建步骤运行的 PowerShell 脚本
- laravel - 加入频道时 Laravel 回显发送数据
- javascript - 使用 React JS 应用程序在 Mysql 数据库中编辑和保存数据