简体   繁体   English

如何将推送通知发送给匿名用户的子集?

[英]How to send a push notification to a subset of users that are anonymous?

I'm new to Parse, so apologies if this question is naïve ... My iOS app doesn't ask users to sign-up, because sign-up is overkill and annoying for my app (ie. it has no sense of a "user"). 我是Parse的新手,所以很抱歉这个问题很幼稚。我的iOS应用程序不要求用户注册,因为注册对于我的应用程序来说是过分的和烦人的(即,它没有任何意义。 “用户”)。 When someone purchases a non-renewing subscription, then the app goes through Parse signup (via FB) and persists data on Parse, so that it is possible for the user to restore the subscription on other devices... but most users won't be buying subscriptions, so, most users will remain anonymous on Parse. 当某人购买了非续订的订阅时,该应用程序将通过Parse进行注册(通过FB)并在Parse上保留数据,因此用户可以在其他设备上恢复订阅...但是大多数用户不会购买订阅,因此,大多数用户将在Parse上保持匿名。

Here is the question: is it possible to send a push notification to: 这是一个问题:是否可以将推送通知发送至:

A) only the users who did not purchase the subscription (ie. are anonymous on parse) ? A) 购买订阅的用户(即在解析时是匿名的)?

B) all users, including those who signed up and those who didn't? B)所有用户,包括那些已经注册和没有注册的用户?

As far as I can see, A) isn't possible because anonymous users cannot persist data on Parse? 据我所知,A)是不可能的,因为匿名用户无法在Parse上保留数据? Would like to know if i'm missing something. 想知道我是否想念一些东西。 Thanks. 谢谢。

EDIT - to make it more concrete, the reason I want to do A) is so I can send a push like "I realized my prices are too high, so I lowered them! go look!" 编辑 -更具体地说,我想做A)的原因是,我可以发送类似“我意识到我的价格太高了,所以我降低了价格!快看!”的推送! :) :)

Anonymous users can save data into parse if you allow them to. 如果允许,匿名用户可以将数据保存到解析中。 In this case you need to look at the PFInstallation class and consider subclassing it and / or connecting it to your User class (to allow you to query only installations whose users have a subscription). 在这种情况下,您需要查看PFInstallation类,并考虑对其进行子类化和/或将其连接到User类(以允许您仅查询其用户已订阅的安装)。 If you have already been doing some testing then installations will exist, you just can't usually see them in the web interface. 如果您已经进行了一些测试,那么将存在安装,您通常无法在Web界面中看到它们。 You need to write code to use / connect the installations with user details. 您需要编写代码才能使用/将安装与用户详细信息联系起来。

Note* you might have multiple users connected to multiple devices... 注意*您可能有多个用户连接到多个设备...

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

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