If you don't already have an Xcode project and just want to try out a Firebase
product, you can download one of ourquickstart samples.
Step 1: Create a Firebase project
Before you can add Firebase to your Apple app, you need to create a Firebase
project to connect to your app. VisitUnderstand Firebase Projectsto learn more about
Firebase projects.
To use Firebase in your Apple app, you need to register your app with your
Firebase project. Registering your app is often called "adding" your app to your
project.
ClickDownload GoogleService-Info.plistto obtain your app's
Firebase config file (GoogleService-Info.plist).
What do you need to know about this config file?
The Firebase config file contains unique, but non-secret identifiers for
your project and app. To learn more about this config file, visitUnderstand Firebase
Projects.
Make sure the config file name is not appended with additional characters,
like(2).
Move your config file into the root of your Xcode project. If prompted,
select to add the config file to all targets.
If you have multiple bundle IDs in your project, you must associate each bundle
ID with a registered app in theFirebaseconsole so that each app can have
its ownGoogleService-Info.plistfile.
Step 4: Add Firebase SDKs to your app
Use Swift Package Manager to install and manage Firebase dependencies.
In Xcode, with your app project open, navigate toFile > Add Packages.
When prompted, add the Firebase Apple platforms SDK repository:
When finished, Xcode will automatically begin resolving and downloading your
dependencies in the background.
Step 5: Initialize Firebase in your app
The final step is to add initialization code to your application. You may have
already done this as part of adding Firebase to your app. If you're using aquickstart sample project, this has been done for you.
Import theFirebaseCoremodule in yourUIApplicationDelegate, as well as any otherFirebase modulesyour app delegate uses.
For example, to useCloud FirestoreandAuthentication:
Configure aFirebaseAppshared instance in your app delegate'sapplication(_:didFinishLaunchingWithOptions:)method:
SwiftUI
// Use Firebase library to configure APIsFirebaseApp.configure()
Swift
// Use Firebase library to configure APIsFirebaseApp.configure()
Objective-C
// Use Firebase library to configure APIs[FIRAppconfigure];
If you're using SwiftUI, you must create an application delegate and attach it
to yourAppstruct viaUIApplicationDelegateAdaptororNSApplicationDelegateAdaptor. You must also disable app delegate swizzling. For
more information, see theSwiftUI instructions.
SwiftUI
@mainstructYourApp:App{// register app delegate for Firebase setup@UIApplicationDelegateAdaptor(AppDelegate.self)vardelegatevarbody:someScene{WindowGroup{NavigationView{ContentView()}}}}
If you've included the Firebase SDK forGoogle Analytics, you can run
your app to send verification to theFirebaseconsole that you've
successfully installed Firebase.
1Firebase AI Logicwas formerly called
"Vertex AI in Firebase" with the podpod 'FirebaseVertexAI'and
SwiftPM LibraryFirebaseVertexAI.
Integrate without using Swift Package Manager
If you don't want to use Swift Package Manager, you can still take advantage of
the Firebase SDKs by using CocoaPods or by importing the frameworks directly.
CocoaPods
Learn more about CocoaPods integration inour guide.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]