Firebase Apple SDK
repository·main·Indexed 27 days ago
https://github.com/firebase/firebase-ios-sdkA collection of libraries for integrating Firebase services—including Firestore, Auth, Cloud Messaging, Crashlytics, Analytics, AI, and App Distribution—into Apple platforms such as iOS, macOS, tvOS, visionOS, and watchOS.
What's inside firebase-ios-sdk
- Firebase Auth provides developers with tools to easily integrate multiple authentication options for end users in iOS and macOS applications. For detailed integration instructions, official documentation, support, and terms of service, refer to the Firebase developer site.
Overview of Firebase Remote Config for iOS
mainFirebase Remote Config is a cloud service that allows you to change the appearance and behavior of your iOS application without requiring users to download an app update. The SDK supports both Objective-C and Swift.Overview of Firebase Data Connect Swift SDK
mainThe Firebase Data Connect Swift SDK allows Swift and SwiftUI applications to connect directly to a managed Google CloudSQL (PostgreSQL) database. This provides a type-safe way to interact with your data using Firebase Data Connect.Overview of Firebase App Distribution SDK
mainThe Firebase App Distribution SDK allows you to display in-app alerts to testers, notifying them when new builds are available for installation.Overview of Firebase ABTesting SDK for iOS
mainFirebase A/B Testing is a service that allows you to run experiments across your iOS app users. It enables you to test changes (such as those involving Firebase Cloud Messaging or Firebase Remote Config) on a subset of users to measure effectiveness before a full rollout.Overview of Firebase APIs for iOS
mainFirebase provides a suite of APIs for iOS development designed to simplify app development, grow user bases, and assist with monetization. For comprehensive setup guides and product-specific documentation, refer to the official Firebase iOS setup guide.Use the default UI for Firebase In-App Messaging
mainFirebase providesFirebaseInAppMessagingDisplayas the default UI implementation for rendering In-App Messaging messages to your end users. This implementation is provided out-of-the-box to handle message display automatically.Understand Firebase Auth Thread Safety
mainThe Firebase Auth library is designed to be thread-safe, meaning developers can call any public method from any thread at any time. To maintain this safety, the library uses internal synchronization mechanisms to prevent race conditions. While end-users do not need to manage these locks, understanding that the library handles concurrency internally helps in understanding why certain methods behave asynchronously or return on the main thread.Understand the Firebase Interop (Component) System
mainFirebase uses a dependency injection system called 'Interop' to allow different Firebase frameworks to depend on each other's functionality without requiring a direct dependency on the entire product.
Key concepts:
- Protocol-based dependency: Framework
Bdepends on functionality provided by FrameworkAvia a shared protocol (e.g.,AInterop). - Decoupling: Framework
Bonly knows about the protocol, not the concrete implementation class ofA. - Type-safe interfaces: Dependencies are declared on the interface version rather than the product version.
- Optionality: The system allows for simulating optional dependencies that only function when the implementing product is included in the project.
- Protocol-based dependency: Framework
Quickstart with the Firebase AI SDK
mainTo get started with the Firebase AI SDK, you can use the official quickstart sample project located in the
quickstart-iosrepository. This sample provides a practical implementation guide to help you integrate Firebase AI capabilities into your iOS application.https://github.com/firebase/quickstart-ios/tree/main/firebaseaiSet up Podspec presubmit tests in SDK workflows
mainTo ensure podspecs are releasable, you can implement a
podspec-presubmitjob in your GitHub Actions workflows. This job runspod spec lintagainst specific remote sources to validate the podspec before merging.Note: It is discouraged to include changes to multiple podspecs (and their dependencies) in a single PR, as this may cause presubmit tests to fail due to the way remote sources are tested.
podspec-presubmit: if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed' runs-on: macOS-latest steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 with: ruby-version: '3.4.1' - name: Setup Bundler run: scripts/setup_bundler.sh - name: Build and test run: scripts/third_party/travis/retry.sh pod spec lint FirebaseDatabase.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'Import headers within the same library
mainWhen importing headers within the same library, use repo-relative paths for all header types.
Exception: Public header imports from other public headers within the same library should use an unqualified import to avoid public module collisions.
#import "publicHeader.h"