- firebase_installations 16.3.6
- Metadata
- firebase_installations #
- Firebase installation ID lifecycle #
- Getting Started #
- Manage Firebase installations
- Add the Firebase installations SDK to your app
- Swift
- Objective-C
- Swift
- Objective-C
- Android
- JavaScript
- Delete a Firebase installation
- Delete an FID with a client API call
- Manage Firebase installations
- Add the Firebase installations SDK to your app
- Swift
- Objective-C
- Swift
- Objective-C
- Android
- JavaScript
- Delete a Firebase installation
- Delete an FID with a client API call
- Upgrade to the Firebase Crashlytics SDK
- Before you begin
- Step 1: Add a Firebase configuration file
- Step 2: Add the Firebase Crashlytics SDK
- Step 3: Update your code
- Crashlytics now rotates IDs based on Firebase installation IDs.
- Reason for change
- The run and upload-symbols scripts are now in FirebaseCrashlytics.
- Fabric SDK
- Firebase Crashlytics SDK
- Reason for change
- The Crashlytics library is now called FirebaseCrashlytics.
- Fabric SDK
- Swift
- Objective-C
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- FirebaseCrashlytics no longer works with the Fabric SDK.
- Fabric SDK
- Swift
- Objective-C
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- The crash and throwException methods are removed.
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- The sharedInstance method is now named crashlytics.
- Fabric SDK
- Swift
- Objective-C
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- setUserIdentifier is now setUserID. setUserName and setUserEmail are removed.
- Fabric SDK
- Swift
- Objective-C
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- CLSLogv and CLSNSLogv are replaced by logging functions.
- Fabric SDK
- Swift
- Objective-C
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- setCustomValue is replacing setObjectValue, setIntValue, setFloatValue, and setBoolValue.
- Fabric SDK
- Swift
- Objective-C
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- recordCustomExceptionName:reason:frameArray: is replaced by the Exception Model API.
- Fabric SDK
- Swift
- Objective-C
- Firebase Crashlytics SDK
- Swift
- Objective-C
- Reason for change
- The CrashlyticsDelegate is replaced by separate methods for handling crash reports.
firebase_installations 16.3.6
Metadata
Firebase installations Flutter plugin
firebase_installations #
Firebase Flutter Installations SDK integration for Android and iOs.
The Firebase installations service (FIS) provides a Firebase installation ID (FID) for each installed instance of a Firebase app.
Firebase installation IDs are different for every installation of every application; different applications on the same device have different Firebase installation IDs. Firebase installation IDs identify app installations and data tied to those app installations.
When you delete an installation ID, the data tied to that installation ID is removed from live and backup systems of all Firebase services that use Firebase installation IDs to identify installations within 180 days. This process is described at a high level in Google’s statement on deletion and retention.
Firebase installation ID lifecycle #
During the normal operation of an app, Firebase installation IDs (FIDs) don’t require special monitoring. However, apps that explictly retrieve and use FIDs should add logic to monitor the potential deletion or rotation of the FID. Here are some cases where FIDs could be deleted or rotated:
- Uninstallation or reinstallation of the app, for instance when an end user installs on a new device.
- The end user clears the cache of the app or the device.
- FID deletion is triggered in the backend due to app inactivity (currently the threshold for this is 270 days of inactivity).
Getting Started #
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Источник
Manage Firebase installations
The Firebase installations service (FIS) provides a Firebase installation ID (FID) for each installed instance of a Firebase app. The Firebase installation ID is used internally by these Firebase services:
Firebase service | Firebase installations functionality |
---|---|
Firebase Cloud Messaging | |
Firebase Performance Monitoring |
Note: Additional Firebase services use different types of credentials for similar purposes of identifying or targeting app instances. See Privacy and security in Firebase for complete detail.
Typically, Firebase services use the Firebase installations service without requiring developers to interact directly with the FIS API. However, there are cases where app developers might want to directly call the FIS API, such as:
- To delete a Firebase installation and data tied to the installation.
- To retrieve identifiers (Firebase installation IDs) in order to target specific app installations.
- To retrieve installation auth tokens to authenticate Firebase installations.
To get started with directly calling the FIS API, add the SDK to your app.
Add the Firebase installations SDK to your app
- Add the dependency for Firebase installations to your Podfile:
- Run pod install and open the created .xcworkspace file.
- Import the Firebase module in your UIApplicationDelegate :
Swift
Objective-C
Swift
Objective-C
Android
Add the dependency for the Firebase installations Android SDK to your module (app-level) Gradle file (usually app/build.gradle ):
JavaScript
Depending on how your web application is hosted, your configuration may be handled automatically or you may need to update your Firebase configuration object.
For example, if your dependencies are added in index.html, add the dependency in the element:
Delete a Firebase installation
Data tied to a Firebase installation is generally not personally identifying. Still, it can be helpful to give users an option to manage and delete this data.
Firebase installation IDs are different for every installation of every application; different applications on the same device have different Firebase installation IDs. Firebase installation IDs identify app installations and data tied to those app installations.
When you delete an installation ID, the data tied to that installation ID is removed from live and backup systems of all Firebase services that use Firebase installation IDs to identify installations within 180 days. This process is described at a high level in Google’s statement on deletion and retention.
Unless you disable all FID-generating services in your app, FIS creates a new ID within a few days. Firebase considers the newly-created ID to be a new Firebase installation, and doesn’t associate it with the previous ID or data in any way.
Delete an FID with a client API call
To delete FIDs generated by Firebase services, call the appropriate method from the Firebase installations SDK:
Источник
Manage Firebase installations
The Firebase installations service (FIS) provides a Firebase installation ID (FID) for each installed instance of a Firebase app. The Firebase installation ID is used internally by these Firebase services:
Firebase service | Firebase installations functionality |
---|---|
Firebase Cloud Messaging | |
Firebase Performance Monitoring |
Note: Additional Firebase services use different types of credentials for similar purposes of identifying or targeting app instances. See Privacy and security in Firebase for complete detail.
Typically, Firebase services use the Firebase installations service without requiring developers to interact directly with the FIS API. However, there are cases where app developers might want to directly call the FIS API, such as:
- To delete a Firebase installation and data tied to the installation.
- To retrieve identifiers (Firebase installation IDs) in order to target specific app installations.
- To retrieve installation auth tokens to authenticate Firebase installations.
To get started with directly calling the FIS API, add the SDK to your app.
Add the Firebase installations SDK to your app
- Add the dependency for Firebase installations to your Podfile:
- Run pod install and open the created .xcworkspace file.
- Import the Firebase module in your UIApplicationDelegate :
Swift
Objective-C
Swift
Objective-C
Android
Add the dependency for the Firebase installations Android SDK to your module (app-level) Gradle file (usually app/build.gradle ):
JavaScript
Depending on how your web application is hosted, your configuration may be handled automatically or you may need to update your Firebase configuration object.
For example, if your dependencies are added in index.html, add the dependency in the element:
Delete a Firebase installation
Data tied to a Firebase installation is generally not personally identifying. Still, it can be helpful to give users an option to manage and delete this data.
Firebase installation IDs are different for every installation of every application; different applications on the same device have different Firebase installation IDs. Firebase installation IDs identify app installations and data tied to those app installations.
When you delete an installation ID, the data tied to that installation ID is removed from live and backup systems of all Firebase services that use Firebase installation IDs to identify installations within 180 days. This process is described at a high level in Google’s statement on deletion and retention.
Unless you disable all FID-generating services in your app, FIS creates a new ID within a few days. Firebase considers the newly-created ID to be a new Firebase installation, and doesn’t associate it with the previous ID or data in any way.
Delete an FID with a client API call
To delete FIDs generated by Firebase services, call the appropriate method from the Firebase installations SDK:
Источник
Upgrade to the Firebase Crashlytics SDK
iOS+ Android Unity
You can now set up Crashlytics in your app by using the new official Firebase Crashlytics SDK, which offers improved APIs that are more consistent with other Firebase products and more intuitive to use.
This guide describes how to upgrade to the new SDK from the legacy Fabric SDK. It describes the changes that come with the new APIs, the reason for the changes, and how to update your code, if required.
Before you begin
Step 1: Add a Firebase configuration file
Open your Project Settings. In the Your apps card, select the bundle ID of the app for which you need a config file.
Click Download GoogleService-Info.plist to obtain your Firebase Apple platforms config file ( GoogleService-Info.plist ).
You can download your Firebase Apple platforms config file again at any time.
Make sure the config filename 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 the Firebase console so that each app can have its own GoogleService-Info.plist file.
Step 2: Add the Firebase Crashlytics SDK
In Cocoapods, replace the Fabric and Crashlytics pods with a Firebase/Crashlytics pod in all targets.
Directly uninstall or remove third party dependencies from Fabric, such as dependencies from Fabric Answers and third party kits.
Install and update the pods, then open your .xcworkspace file to see the project in Xcode:
Step 3: Update your code
In Xcode, rebuild your app, then re-open your .xcworkspace file again.
Review the following SDK changes and make the appropriate updates to your code:
Crashlytics now rotates IDs based on Firebase installation IDs.
Crashlytics uses the Crashlytics Installation UUID to identify instances of your app and to associate your users’ data with their devices. Previously, Crashlytics rotated your user’s Installation UUID when the advertising ID of their device changed. Now, Crashlytics rotates the Installation UUID based on the user’s Firebase installation ID (FID). For more information, visit Manage Firebase installation IDs.
Reason for change
Using FIDs is consistent with other Firebase SDKs.
The run and upload-symbols scripts are now in FirebaseCrashlytics.
You can now access the run and upload-symbols scripts from the new FirebaseCrashlytics library. Note that you can still call upload-symbols from anywhere in your build process to manually upload your dSYMs.
In addition, Fabric’s API_KEY and BUILD_SECRET are no longer included in the new SDK. Instead, Crashlytics now uses your app’s GoogleService-info.plist to associate your app with your Firebase project and retain your historic crash data.
Fabric SDK
Firebase Crashlytics SDK
Reason for change
Crashlytics no longer uses the Fabric SDK as a dependency so we’re moving our CLI tools to a new library.
The Crashlytics library is now called FirebaseCrashlytics.
In your app, update your import paths:
Fabric SDK
Swift
Objective-C
Firebase Crashlytics SDK
Swift
Objective-C
Reason for change
Updating the name of the Crashlytics library makes it consistent with other Firebase libraries (e.g., FirebaseFirestore and FirebaseAuth ).
FirebaseCrashlytics no longer works with the Fabric SDK.
Now, FirebaseCrashlytics can only be initialized with the Firebase Crashlytics SDK. You can start up an instance of FirebaseCrashlytics by calling FirebaseApp.configure in Swift or [FIRApp configure] in Objective-C.
Within your application:didFinishLaunchingWithOptions , replace calls to Fabric.with and startWithAPIKey with a call to FirebaseApp :
Fabric SDK
Swift
Objective-C
Firebase Crashlytics SDK
Swift
Objective-C
Reason for change
Using the new methods to initialize Crashlytics is more consistent with how other Firebase services are initialized.
The crash and throwException methods are removed.
The new SDK no longer includes the crash or throwException methods. Instead, use fatalError in Swift or an empty array in Objective-C to force a crash.
Firebase Crashlytics SDK
Swift
Objective-C
Reason for change
Different kinds of crashes can occur for a variety of reasons, and these methods did not clearly specify whether the resulting crashes occurred during runtime or in your app’s native SDK.
The sharedInstance method is now named crashlytics.
The new SDK no longer includes the sharedInstance method. To initialize Crashlytics, use crashlytics instead (read the reference documentation for Swift or Objective-C for more information). In your app’s delegate, update your initialization script:
Fabric SDK
Swift
Objective-C
Firebase Crashlytics SDK
Swift
Objective-C
Reason for change
We named renamed the instance getter method to be consistent with other Firebase SDKs.
setUserIdentifier is now setUserID. setUserName and setUserEmail are removed.
Previously, you could set a name or email associated with a crash using setUserName and setUserEmail , but these methods will no longer be defined. The new preferred method to set IDs for your users is to use setUserID .
Fabric SDK
Swift
Objective-C
Firebase Crashlytics SDK
Swift
Objective-C
Reason for change
We adopted the method name setUserID to be consistent with other Firebase APIs and removed setUserName and setUserEmail to discourage logging PII through Crashlytics.
CLSLogv and CLSNSLogv are replaced by logging functions.
The new SDK no longer includes the CLSLogv or CLSNSLogv functions. To add custom log messages, use the new logging methods in the Crashlytics library. Note that the new methods no longer print to stdout or NSLog (we recommend writing a wrapper if you want to keep this behavior).
Fabric SDK
Swift
Objective-C
Firebase Crashlytics SDK
Swift
Objective-C
If you used CLS_LOG , add the following to a header file to continue getting file names and line numbers in log statements:
Reason for change
The new methods require instances, which makes it easier to test code.
setCustomValue is replacing setObjectValue, setIntValue, setFloatValue, and setBoolValue.
The custom setter methods are no longer included in the new SDK. Previously, you could use the methods to set key/value pairs to send along with your crash report. Now, you can use setCustomValue:forKey to set key/value pairs for all data types.
Fabric SDK
Swift
Objective-C
Firebase Crashlytics SDK
Swift
Objective-C
Reason for change
The new method name is unique to Crashlytics and makes it clear that Crashlytics is not key-value compliant.
recordCustomExceptionName:reason:frameArray: is replaced by the Exception Model API.
If your app runs in a non-native environment (e.g., JavaScript or Unity), you can use the Exception Model API to report crash metadata in your app’s native exception format.
Fabric SDK
Swift
let topFrame = CLSStackFrame() topFrame.symbol = «doSomethingBad» topFrame.fileName = «bad.cc» topFrame.lineNumber = 23
Objective-C
Firebase Crashlytics SDK
Swift
Objective-C
Reason for change
This feature has been long requested and allows you to extend Crashlytics onto other platforms like Unity, Flutter, or React Native.
The CrashlyticsDelegate is replaced by separate methods for handling crash reports.
You can now use a new set of methods for handling crash reports:
didFinishLaunchingWithOptions is now replaced by the new handler checkForUnsentReportsWithCompletion .
crashlyticsDidDetectReportForLastExecution is now replaced by didCrashDuringPreviousExecution . didCrashDuringPreviousExecution allows you to conveniently detect crashes that occur during the last run of your app.
crashlyticsCanUseBackgroundSessions is now permanently set to true.
We no longer support inspecting the CLSReport object in the delegate.
By default, Crashlytics automatically uploads crash reports at startup, and you could previously call didFinishLaunchingWithOptions to let your users opt-in to crash reporting. Now, when you call setCrashlyticsCollectionEnabled=false to turn off automatic crash reporting, Crashlytics calls checkForUnsentReportsWithCompletion , which lets your users choose whether or not to send crash reports when your app crashes. You can then call sendUnsentReports if the user opts in or deleteUnsentReports if the user opts out.
Note that you can also call sendUnsentReports and deleteUnsentReports outside of checkForUnsentReportsWithCompletion . For example, you may want to permanently set up or disable crash reporting if your users have given you blanket approval or disapproval to send crash reports. Keep in mind that you may never receive crash reports if your app crashes early on in its lifecycle.
Источник