gkeenley
gkeenley

Reputation: 7388

Which appDelegate file do I add Firebase code to?

I want to attach Firebase to my React Native app, and in the guide on the firebase site it says "To connect Firebase when your app starts up, add the initialization code below to your main AppDelegate class." It then has one piece of code for Swift, and one for Objective C. How do I know which I should use?

Thanks!

Upvotes: 0

Views: 2606

Answers (1)

rabbit87
rabbit87

Reputation: 3205

Given that you have "react-native-firebase" tag in the question, I assume you are using that package. If you take a look at the documentation it says

To initilize the native SDK in your app, add the following to your ios/[YOUR APP NAME]/AppDelegate.m file

You can also try to look at the example project where the firebase related code is placed inside AppDelegate.m file

Upvotes: 1

Related Questions