Jojo Jojo - 1 year ago 72
iOS Question

Firebase not worked on real devices (iOS)

I install Firebase in my iOS app.
Everything works fine on simulator but on real device it doesn't execute / return a query to my database.

I try to clean the project but it doesn't change anything.

Have you a solution ?

EDIT : Update with code

override func viewDidLoad() {

// Setup Firebase
self.ref = FIRDatabase.database().reference()

self.ref.child("Database").observeEventType(.Value, withBlock: { (snapshot) in

if snapshot.exists() {
for rest in snapshot.children.allObjects as! [FIRDataSnapshot] {

} else {


}) { (error) in

Answer Source

There is no fault in your code, I had the same problem. Here is what I did:

  1. Simply go to Your Project in the navigation pane on the left.

  2. Go to Build Settings and scroll down to Build Options.

  3. Change the value of Enable Bitcode to No.

Hope it works out for you too!

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