liartie

Untitled

Aug 13th, 2020
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.44 KB | None | 0 0
  1.      func getUpdateStatus(){
  2.            var ref: DatabaseReference!
  3.  
  4.            ref = Database.database().reference()
  5.            ref.child("checkeriOS").child("updateRequired").observeSingleEvent(of: .value, with: { (snapshot) in
  6.                var requiresUpdate = snapshot.value as? Int
  7.                print(requiresUpdate)
  8.                
  9.            }) { (error) in
  10.                print("Error connecting to database")
  11.            }
  12.      }
Advertisement
Add Comment
Please, Sign In to add comment