Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. let configuration = ParseClientConfiguration
  2. {
  3. $0.applicationId = "..."
  4. $0.clientKey = "..."
  5. $0.server = "..."
  6.  
  7. }
  8. Parse.enableLocalDatastore()
  9. Parse.initialize(with: configuration)
  10. ...
  11. func blancoUser() {
  12. let object = PFObject(className: "UserData")
  13. object["id"] = (UUID().uuidString)
  14. object["LoginName"] = "userName"
  15. object["PinCode"] = "00000"
  16. object["ScreenName"] = "test"
  17. object["YearOfBirth"] = 0
  18.  
  19. object.pinInBackground()
  20. }
  21. ...
  22.  
  23. let query = PFQuery(className: "UserData")
  24. var users:[UserData] = [UserData]()
  25.  
  26. query.fromLocalDatastore()
  27. query.findObjectsInBackground { (objects: [PFObject]?, error: Error?) in
  28. if let error = error {
  29. print(error.localizedDescription)
  30. } else if let objects = objects
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement