gpt4 book ai didi

ios - 当特定用户发帖时解析推送通知

转载 作者:行者123 更新时间:2023-11-28 21:50:49 25 4
gpt4 key购买 nike

我最近更新了一个应用程序,以在 Parse 中配置后端服务器。他们使用用户名、Twitter 凭据或 Facebook 凭据登录。从那里,他们可以创建一些“帖子”,这只是向我在 Parse 仪表板中设置的对象添加一行。

我知道 Parse 具有一些推送通知功能,但我想知道一种具体用途。有没有办法让用户“关注”另一个用户,并在该用户每次发布内容时收到 Push Notification?如果是这样,是否可以通过 Native Parse 和 iOS 函数处理,或者必须为此设置 Cloud-Code

最佳答案

这可以使用客户端推送来实现(如果它被禁用,您必须在 Parse 的应用设置中启用它)。

然后您可以使用此代码从创建帖子的用户的设备向他的所有关注者发送推送:

// Send a notification to all devices subscribed to the "Giants" channel.
PFPush *push = [[PFPush alloc] init];
[push setChannel:/* Set the channels here */];
[push setMessage:@"User XYZ just posted something"];
[push sendPushInBackground];

https://www.parse.com/docs/push_guide#sending/iOS

关于ios - 当特定用户发帖时解析推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28413435/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com