|
|
7 mesi fa | |
|---|---|---|
| .. | ||
| FrameworkMaker.xcodeproj | a0fd16d383 [Infra] Bump podspec min. versions (#15015) | 9 mesi fa |
| FrameworkMaker.entitlements | d40c518e1a Rename ReleaseTooling (#6772) | 5 anni fa |
| Info.plist | d40c518e1a Rename ReleaseTooling (#6772) | 5 anni fa |
| METADATA.md | 5510893b5c [Release Tooling] Separate out dynamic content from zip README.md (#11113) | 3 anni fa |
| README.md | e5962228d7 Fix Readme template indentation in ReleaseTooling (#15228) | 7 mesi fa |
| dummy_Firebase_lib | d40c518e1a Rename ReleaseTooling (#6772) | 5 anni fa |
This directory contains the full Firebase Apple distribution, packaged as static xcframeworks that include support for the iOS, tvOS, macOS, watchOS and Catalyst platforms.
cp -rP,
rsync -a).Each Firebase component requires several xcframeworks in order to function properly. Each section below lists the xcframeworks you'll need to include in your project in order to use that Firebase SDK in your application.
Xcode 16.2 or newer is required.
To integrate a Firebase SDK with your app:
METADATA.md.⌘-1 to open the Project Navigator pane. It will open on
left side of the Xcode window if it wasn't already open.⚠ To disable AdId support, do not copy
GoogleAppMeasurementIdentitySupport.xcframework.
Drag each framework from the directory named after the SDK into the Project Navigator pane. Note that there may be no additional frameworks, in which case this directory will be empty. For instance, if you want the Database SDK, look in the Database folder for the required frameworks. In the dialog box that appears, make sure the target you want this framework to be added to has a checkmark next to it, and that you've selected "Copy items if needed."
Embed each framework that was dragged in. Navigate to the
target's General settings and find Frameworks, Libraries, & Embedded
Content. For each framework dragged in from the Firebase.zip, select
Embed & Sign. This step will enable privacy manifests to be picked up by
Xcode's tooling.
Add the -ObjC flag to Other Linker Settings:
a. In your project settings, open the Settings panel for your target.
b. Go to the Build Settings tab and find the Other Linker Flags setting
in the **Linking** section.
c. Double-click the setting, click the '+' button, and add -ObjC
-lc++ flag to Other Linker Settings:a. In your project settings, open the Settings panel for your target.
b. Go to the Build Settings tab and find the Other Linker Flags setting
in the **Linking** section.
c. Double-click the setting, click the '+' button, and add -lc++
If you're using Firebase Analytics, disable GoogleAdsOnDeviceConversion.xcframework for Mac Catalyst:
a. In your project settings, open the Settings panel for your target.
b. Go to the Build Phases tab and find the GoogleAdsOnDeviceConversion.xcframework setting in the Link Binary With Libraries section.
c. Click on the filter icon button in the GoogleAdsOnDeviceConversion.xcframework row and deselect the Mac Catalyst checkbox.
Drag the Firebase.h header in this directory into your project. This will
allow you to #import "Firebase.h" and start using any Firebase SDK that you
have.
Drag module.modulemap into your project and update the
"User Header Search Paths" in your project's Build Settings to include the
directory that contains the added module map.
If your app does not include any Swift implementation, you may need to add a dummy Swift file to the app to prevent Swift system library missing symbol linker errors. See https://forums.swift.org/t/using-binary-swift-sdks-from-non-swift-apps/55989.
⚠ If prompted with the option to create a corresponding bridging header for the new Swift file, select Don't create.
If you want to add another SDK, repeat the steps above with the xcframeworks for the new SDK. You only need to add each framework once, so if you've already added a framework for one SDK, you don't need to add it again. Note that some frameworks are required by multiple SDKs, and so appear in multiple folders.
The Firebase frameworks list the system libraries and frameworks they depend on
in their modulemaps. If you have disabled the "Link Frameworks Automatically"
option in your Xcode project/workspace, you will need to add the system
frameworks and libraries listed in each Firebase framework's
.framework/Modules/module.modulemap file to your target's or targets'
"Link Binary With Libraries" build phase. Specifically, you may see the error
ld: warning: Could not find or use auto-linked framework... which is an
indicator that not all system libraries are being brought into your build
automatically.
You can get samples for Firebase from https://github.com/firebase/quickstart-ios:
git clone https://github.com/firebase/quickstart-ios
Note that several of the samples depend on SDKs that are not included with this archive; for example, FirebaseUI. For the samples that depend on SDKs not included in this archive, you'll need to use CocoaPods or use the ZipBuilder to create your own custom binary frameworks.