https://github.com/rudderlabs/rudder-integration-firebase-swift
Repository for the RudderStack iOS SDK integration with Firebase
https://github.com/rudderlabs/rudder-integration-firebase-swift
firebase ios rudderstack swift
Last synced: about 1 year ago
JSON representation
Repository for the RudderStack iOS SDK integration with Firebase
- Host: GitHub
- URL: https://github.com/rudderlabs/rudder-integration-firebase-swift
- Owner: rudderlabs
- License: other
- Created: 2022-03-10T07:16:26.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-20T06:55:54.000Z (over 1 year ago)
- Last Synced: 2025-04-20T19:43:47.108Z (about 1 year ago)
- Topics: firebase, ios, rudderstack, swift
- Language: Swift
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 13
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
The Customer Data Platform for Developers
Website
·
Documentation
·
Community Slack
---
# Integrating RudderStack iOS SDK with Firebase
This repository contains the resources and assets required to integrate the [RudderStack iOS SDK](https://www.rudderstack.com/docs/stream-sources/rudderstack-sdk-integration-guides/rudderstack-ios-sdk/ios-v2/) with [Firebase](https://firebase.google.com/).
For more information on configuring Firebase as a destination in RudderStack and the supported events and their mappings, refer to the [Firebase documentation](https://www.rudderstack.com/docs/destinations/analytics/firebase/).
| Important: This device mode integration is supported for Firebase v8.15.0 and above.|
| :---|
## Step 1: Integrate the SDK with Firebase
1. Add [Firebase](http://firebase.google.com) as a destination in the [RudderStack dashboard](https://app.rudderstack.com/).
2. Download the `GoogleService-Info.plist` from your [Firebase console](https://console.firebase.google.com/) and place it in your project.
3. `RudderFirebase` is available through [CocoaPods](https://cocoapods.org). To install it, add the following line to your `Podfile`:
```ruby
pod 'RudderFirebase', '~> 1.3.0'
```
4. Run the `pod install` command.
## Step 2: Import the SDK
### Swift
```swift
import RudderFirebase
```
### Objective C
```objectivec
@import RudderFirebase;
```
## Step 3: Initialize the RudderStack client (`RSClient`)
Place the following in your `AppDelegate` under the `didFinishLaunchingWithOptions` method.
### Objective C
```objective-c
RSConfig *config = [[RSConfig alloc] initWithWriteKey:WRITE_KEY];
[config dataPlaneURL:DATA_PLANE_URL];
[[RSClient sharedInstance] configureWith:config];
[[RSClient sharedInstance] addDestination:[[RudderFirebaseDestination alloc] init]];
```
### Swift
```swift
let config: RSConfig = RSConfig(writeKey: WRITE_KEY)
.dataPlaneURL(DATA_PLANE_URL)
RSClient.sharedInstance().configure(with: config)
RSClient.sharedInstance().addDestination(RudderFirebaseDestination())
```
## Step 4: Send events
Follow the steps listed in the [RudderStack iOS SDK](https://github.com/rudderlabs/rudder-sdk-ios/tree/master-v2#sending-events) repo to start sending events to Firebase.
## About RudderStack
RudderStack is the **customer data platform** for developers. With RudderStack, you can build and deploy efficient pipelines that collect customer data from every app, website, and SaaS platform, then activate your data in your warehouse, business, and marketing tools.
| Start building a better, warehouse-first CDP that delivers complete, unified data to every part of your customer data stack. Sign up for [RudderStack Cloud](https://app.rudderstack.com/signup?type=freetrial) today. |
| :---|
## Contact us
For queries on configuring or using this integration, start a conversation in our [Slack](https://rudderstack.com/join-rudderstack-slack-community) community.