santosh kc santosh kc - 1 year ago 629
Swift Question

Search all user by user's full name in firebase IOS

I have added

in my project. I need to filter all the users according to the text in
and display in the tableview. I do research for the query in firebase documentation but I did not find. I just need the firebase query for partial string. Can any one help me?

Answer Source

I believe you have these in your firebase database

  • firstName
  • lastName

and firebase won't let you do multiple where clause, to solve this, just add a new field, so it will become like this

  • firstName
  • lastName
  • fullName

   .queryEqualToValue("your full name")
   .observeSingleEventOfType(.Value, withBlock: { (snapshot) -> Void in

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download