简体   繁体   English

本地存储或 Swift 中的 firebase

[英]local Storage or firebase in Swift

I want to make an app with storage but this Information should be shared to other users in real time.我想制作一个带存储的应用程序,但此信息应实时共享给其他用户。 For example one could belong to many different groups and when something relative to one group changes every member must receive a notification but also each member should access to all relative Group data (statistics, etc.) Should I Go with coredata and some way of sending messages, or should I choose firebase for all kinds of data?例如,一个人可能属于许多不同的组,当与一个组相关的某些事情发生变化时,每个成员都必须收到通知,但每个成员都应该访问所有相关的组数据(统计数据等)。我应该使用 coredata 和某种发送方式的 Go消息,还是我应该为各种数据选择firebase? Any ideas would be appreciated任何想法,将不胜感激

I would implement Firebase SnapshotListener for that while keeping all information in Firebase so you will avoid some sync issues.我会为此实现 Firebase SnapshotListener ,同时将所有信息保留在 Firebase 中,这样您就可以避免一些同步问题。 Look at this link for how to "Get realtime updates with Cloud Firestore", also do not forget to check corresponding Google video with some more explanation on how it works and why single "source of truth" is important for you.查看此链接以了解如何“使用 Cloud Firestore 获取实时更新”,也不要忘记查看相应的Google 视频,其中包含有关其工作原理以及为什么单一“事实来源”对您很重要的更多解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM