I'm trying to retrieve data from firebase and I an using the guide given by firebase but I am not able to create the reference with my firebase database.
FIRDatabaseReference * ref = [[FIRDatabase alloc]
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: key cannot be nil'
I'm no firebase expert, but when you're working with a class in Obj-C, you'll either invoke its class methods (e.g.
[FIRDatabase database]), or you'll first allocate and initialize it (
[[FIRDatabase alloc] <an initializer>]), and secondly use an instance method on the instance.
In your code sample above, I see an alloc without an initializer, which makes me think you're missing something.
If I look at the iOS quick start, I see a call to
initWithURL, which is one of the initializers.