简体   繁体   English

如何从iOS中的解析中获取用户特定的推送通知的历史记录?

[英]How to fetch history of user specific push notifications from parse in iOS?

I have implemented an iOS app with parse integration for data handling. 我已经实现了一个具有解析集成的iOS应用,用于数据处理。 App uses push notifications services provided by Parse. 应用程序使用Parse提供的推送通知服务。 I am using Parse PUSH console to send the push notification based upon user email ID and its working. 我正在使用Parse PUSH控制台根据用户电子邮件ID及其工作情况发送推送通知。 Till now everything is fine. 到现在为止一切都很好。 The problem is with fetching the notifications data of that user from Parse. 问题在于从Parse中获取该用户的通知数据。 I couldn't find any way to fetch the notifications history of the user. 我找不到任何方法来获取用户的通知历史记录。

I have only one option ie create new table in Parse and store the notifications information in that table whenever app receives a push notification so that I can query from that table. 我只有一个选择,即在Parse中创建新表,并在应用程序收到推送通知时将通知信息存储在该表中,以便我可以从该表中查询。

But the problem is if the app is not running in the background and user has not lunched the app then notifications data could not be stored in the newly created table as the app is not awake. 但是问题是,如果该应用程序未在后台运行,并且用户没有午餐,则该通知数据将不会存储在新创建的表中,因为该应用程序尚未唤醒。

Is there any update from the Parse team or any other solution to get this work done? 解析团队是否有任何更新或任何其他解决方案来完成这项工作?

Thanks in advance. 提前致谢。

all the notifications that are sent by parse-server are stored in _PushStatus collection. 解析服务器发送的所有通知都存储在_PushStatus集合中。 This is also the collection that parse dashboard fetch the data from. 这也是解析仪表板从中获取数据的集合。 What you can do is to see what kind of data there is in this collection and create a query that will fetch the data that you need from it. 您可以做的是查看此集合中存在什么样的数据,并创建一个查询以从中获取所需的数据。 You can use mongo CLI in order to display this collection or Mongo admin UI tool like MongoDB compass. 您可以使用mongo CLI来显示此集合,也可以使用Mongo admin UI工具(例如MongoDB罗盘)。

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

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