ios - 跟踪 Firebase 上的活跃用户

标签 ios swift firebase

如果这个问题已经被问过,但我找不到它,我深表歉意。我试图弄清楚是否有一种方法可以跟踪用户打开我的应用程序的频率(如果他们已经登录)。Firebase 仅显示他们上次登录的时间,但如果他们已经登录则不会显示所以我不知道他们最后一次打开我的应用程序是什么时候。

最佳答案

Cloud Firestore 中没有内置状态跟踪功能。它只是与 Firestore 用于在客户端和服务器之间通信的协议(protocol)不太匹配。

实现此功能的最简单方法是使用实​​时数据库,并可能将信息从那里同步到 Cloud Firestore。有关此(相当复杂)场景的演练,请查看 Firestore documentation on building a presence system .

关于ios - 跟踪 Firebase 上的活跃用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50662339/

相关文章:

ios - 运行异步生成的代码块, 'only' 当特定 View Controller 可见并受控制时

ios - iOS 10 早期版本的计时器? (Xcode 8, swift 3)

ios - 如何在两个 View Controller 之间的 swift 应用程序中传递 json 数据

ios - ResponseSerializer 'cannot call value of non-function type ' NSHTTPURLResponse ?'' 与 Swift 3

swift 火力基地 : can't create keys with same order exception

objective-c - 以编程方式创建的 UIBarButtonItem 未启动选择器操作

ios - UINavigationBar:拦截返回按钮和返回滑动手势

json - 在 Excel 中使用 VBA 时 Firebase REST API 不解析 JSON

android - Firebase Analytics 数据差异

ios - RestKit: 'NSInternalInconsistencyException',原因: 'Unable to perform mapping: No ` managedObjectContext`已分配