I want my PFSessions to be exclusive, that is, if the user has already registered on a specific device in a certain place, if another device logs on with the same credentials, I want the previous session to be completed, a warning message, of course. It looks like the old AOL Instant Messaging format. so does anyone know how i will do it fast? will it require CoreLocation?
I found this article about the user's current location, how can I use this as part of the solution to my question?
https://www.veasoftware.com/tutorials/2014/10/18/xcode-6-tutorial-ios-8-current-location-in-swift
UPDATE
so I just read this parsing article about their feedback.
http://blog.parse.com/announcements/announcing-new-enhanced-sessions/
however, when I log in to the same account with another device, the sessions are allowed to live accordingly, which I donβt want. How to solve my dilemma?
UPDATE
I received a very detailed description of how to achieve a general method that I am trying to implement:

however, I am not very good at implementing cloud code, can someone very briefly depict a piece of code similar to what it is trying to pass to me?
UPDATE
So, I did some more research and talked about what I was told about how to use cloud code calls in parsing, and if I want to destroy previous currentUser sessions, I wrote the following code in my login βsuccessβ:
PFUser.logInWithUsernameInBackground(userName, password: passWord) { (user, error: NSError?) -> Void in if user != nil || error == nil { dispatch_async(dispatch_get_main_queue()) { self.performSegueWithIdentifier("loginSuccess", sender: self) PFCloud.callFunctionInBackground("currentUser", withParameters: ["PFUser":"currentUser"])
If it's even the right format or code, but I'm sure this is the right direction? Can anyone change or extend the code I'm trying to achieve?