I was having trouble wording the title, sorry.
Basically, I want to know the best practice when asking permissions from one user to another. An example would be those family tracker apps, where one user requests to follow another, and said user has to accept that request so the first user can follow their locations.
I am using Parse if that makes a difference. Thanks!
For achieving this with Parse, I would recommend creating a class in Parse called Following
which will have two User
class pointers - fromUser
and toUser
. The class could also have a bool called allowed
.
When a user requests to follow someone else, a new Following
object is created and allowed
defaults to false. Only when the toUser
accepts to be followed, then you can update allowed
to be true.
In terms of how to prompt the toUser
if they accept the follower, you could use a simple UIAlertController.
Also, I highly recommend checking out the Parse Anypic tutorial.