iOS Extension - Fatal Exception: com.firebase.core Default app has already been configured

Stefan picture Stefan · Jul 23, 2016 · Viewed 9.8k times · Source

iOS Extension - Fatal Exception: com.firebase.core Default app has already been configured.

I run the Fir.configure() in the viewDidLoad() method and some events pass and get through to Firebase.

Can someone help me figure this out.. Google is not friendly enough.

PS: Yes I created a second .plist, and a second app in Firebase Console. PPS: Yes I selected the correct target for each GoogleServices plist

I'm seeking the solution..

Answer

Didier Nizard picture Didier Nizard · Aug 29, 2016

I don't know if you're still looking for a solution but I had the same issue, using firebase with extension.

I ended up doing this :

if(FIRApp.defaultApp() == nil){
    FIRApp.configure()
}

This will check if the app is already configured so that there is no crash.