Android firebase installation id

Содержание
  1. firebase_installations 16.3.6
  2. Metadata
  3. firebase_installations #
  4. Firebase installation ID lifecycle #
  5. Getting Started #
  6. Manage Firebase installations
  7. Add the Firebase installations SDK to your app
  8. Swift
  9. Objective-C
  10. Swift
  11. Objective-C
  12. Android
  13. JavaScript
  14. Delete a Firebase installation
  15. Delete an FID with a client API call
  16. Manage Firebase installations
  17. Add the Firebase installations SDK to your app
  18. Swift
  19. Objective-C
  20. Swift
  21. Objective-C
  22. Android
  23. JavaScript
  24. Delete a Firebase installation
  25. Delete an FID with a client API call
  26. Upgrade to the Firebase Crashlytics SDK
  27. Before you begin
  28. Step 1: Add a Firebase configuration file
  29. Step 2: Add the Firebase Crashlytics SDK
  30. Step 3: Update your code
  31. Crashlytics now rotates IDs based on Firebase installation IDs.
  32. Reason for change
  33. The run and upload-symbols scripts are now in FirebaseCrashlytics.
  34. Fabric SDK
  35. Firebase Crashlytics SDK
  36. Reason for change
  37. The Crashlytics library is now called FirebaseCrashlytics.
  38. Fabric SDK
  39. Swift
  40. Objective-C
  41. Firebase Crashlytics SDK
  42. Swift
  43. Objective-C
  44. Reason for change
  45. FirebaseCrashlytics no longer works with the Fabric SDK.
  46. Fabric SDK
  47. Swift
  48. Objective-C
  49. Firebase Crashlytics SDK
  50. Swift
  51. Objective-C
  52. Reason for change
  53. The crash and throwException methods are removed.
  54. Firebase Crashlytics SDK
  55. Swift
  56. Objective-C
  57. Reason for change
  58. The sharedInstance method is now named crashlytics.
  59. Fabric SDK
  60. Swift
  61. Objective-C
  62. Firebase Crashlytics SDK
  63. Swift
  64. Objective-C
  65. Reason for change
  66. setUserIdentifier is now setUserID. setUserName and setUserEmail are removed.
  67. Fabric SDK
  68. Swift
  69. Objective-C
  70. Firebase Crashlytics SDK
  71. Swift
  72. Objective-C
  73. Reason for change
  74. CLSLogv and CLSNSLogv are replaced by logging functions.
  75. Fabric SDK
  76. Swift
  77. Objective-C
  78. Firebase Crashlytics SDK
  79. Swift
  80. Objective-C
  81. Reason for change
  82. setCustomValue is replacing setObjectValue, setIntValue, setFloatValue, and setBoolValue.
  83. Fabric SDK
  84. Swift
  85. Objective-C
  86. Firebase Crashlytics SDK
  87. Swift
  88. Objective-C
  89. Reason for change
  90. recordCustomExceptionName:reason:frameArray: is replaced by the Exception Model API.
  91. Fabric SDK
  92. Swift
  93. Objective-C
  94. Firebase Crashlytics SDK
  95. Swift
  96. Objective-C
  97. Reason for change
  98. 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 Cloud Messaging uses Firebase installation IDs to target devices for message delivery.

Firebase In-App Messaging uses Firebase installation IDs to target devices for message delivery.

Performance Monitoring uses Firebase installation IDs to calculate the number of unique Firebase installations that access network resources, to ensure that access patterns ar sufficiently anonymous. It also uses Firebase installation IDs with Firebase Remote Config to manage the rate of performance event reporting.

Predictions uses Firebase installation IDs to associate Firebase installations with a project and to retrieve a time series of events. It uses those events to enable prediction of the likelihood of occurrence of customer-specified events, as well as spend and churn predictions by default.

Google Analytics for Firebase uses the data to provide analytics and attribution information. The precise information collected can vary by the device and environment.

Remote Config uses Firebase installation IDs to select configuration values to return to end-user devices.

Credentials called installation auth tokens are used by Firebase ML for device authentication when interacting with app instances, for example, to distribute developer models to app instances.

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

  1. Add the dependency for Firebase installations to your Podfile:
  2. Run pod install and open the created .xcworkspace file.
  3. 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 Cloud Messaging uses Firebase installation IDs to target devices for message delivery.

Firebase In-App Messaging uses Firebase installation IDs to target devices for message delivery.

Performance Monitoring uses Firebase installation IDs to calculate the number of unique Firebase installations that access network resources, to ensure that access patterns ar sufficiently anonymous. It also uses Firebase installation IDs with Firebase Remote Config to manage the rate of performance event reporting.

Predictions uses Firebase installation IDs to associate Firebase installations with a project and to retrieve a time series of events. It uses those events to enable prediction of the likelihood of occurrence of customer-specified events, as well as spend and churn predictions by default.

Google Analytics for Firebase uses the data to provide analytics and attribution information. The precise information collected can vary by the device and environment.

Remote Config uses Firebase installation IDs to select configuration values to return to end-user devices.

Credentials called installation auth tokens are used by Firebase ML for device authentication when interacting with app instances, for example, to distribute developer models to app instances.

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

  1. Add the dependency for Firebase installations to your Podfile:
  2. Run pod install and open the created .xcworkspace file.
  3. 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.

Источник

Читайте также:  Замок с вампирами для андроид
Оцените статью