LuxChat  2.0
Instant messenger for iOS
Class Methods | List of all members
FIRAnalytics Class Reference

#import <FIRAnalytics.h>

Inheritance diagram for FIRAnalytics:

Class Methods

(void) + logEventWithName:parameters:
 
(void) + setUserPropertyString:forName:
 
(void) + setUserID:
 
(void) + handleEventsForBackgroundURLSession:completionHandler:
 
(void) + handleOpenURL:
 
(void) + handleUserActivity:
 

Detailed Description

The top level Firebase Analytics singleton that provides methods for logging events and setting user properties. See the developer guides for general information on using Firebase Analytics in your apps.

Method Documentation

+ (void) handleEventsForBackgroundURLSession: (NSString *)  identifier
completionHandler: (void(^)(void))  completionHandler 

Handles events related to a URL session that are waiting to be processed.

For optimal use of Firebase Analytics, call this method from the [UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler] method of the app delegate in your app.

Parameters
identifierThe identifier of the URL session requiring attention.
completionHandlerThe completion handler to call when you finish processing the events. Calling this completion handler lets the system know that your app's user interface is updated and a new snapshot can be taken.

Provided by category FIRAnalytics(AppDelegate).

+ (void) handleOpenURL: (NSURL *)  url

Handles the event when the app is launched by a URL.

Call this method from UIApplicationDelegate application:openURL:options:, or UIApplicationDelegate application:openURL:sourceApplication:annotation: in your app.

Parameters
urlThe URL resource to open. This resource can be a network resource or a file.

Provided by category FIRAnalytics(AppDelegate).

+ (void) handleUserActivity: (id)  userActivity

Handles the event when the app receives data associated with user activity that includes a Universal Link (on iOS 9.0 and above).

Call this method from [UIApplication continueUserActivity:restorationHandler:] in your app delegate (on iOS 9.0 and above).

Parameters
userActivityThe activity object containing the data associated with the task the user was performing.

Provided by category FIRAnalytics(AppDelegate).

+ (void) logEventWithName: (nonnull NSString *)  name
parameters: (nullable NSDictionary< NSString *, NSObject * > *)  parameters 

Logs an app event. The event can have up to 25 parameters. Events with the same name must have the same parameters. Up to 500 event names are supported. Using predefined events and/or parameters is recommended for optimal reporting.

The following event names are reserved and cannot be used:

  • app_clear_data
  • app_uninstall
  • app_update
  • error
  • first_open
  • in_app_purchase
  • notification_dismiss
  • notification_foreground
  • notification_open
  • notification_receive
  • os_update
  • session_start
  • user_engagement
Parameters
nameThe name of the event. Should contain 1 to 32 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. See FIREventNames.h for the list of reserved event names. The "firebase_" prefix is reserved and should not be used. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
parametersThe dictionary of event parameters. Passing nil indicates that the event has no parameters. Parameter names can be up to 24 characters long and must start with an alphabetic character and contain only alphanumeric characters and underscores. Only NSString and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are supported. NSString parameter values can be up to 36 characters long. The "firebase_" prefix is reserved and should not be used for parameter names.
+ (void) setUserID: (nullable NSString *)  userID

Sets the user ID property. This feature must be used in accordance with Google's Privacy Policy

Parameters
userIDThe user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 36 characters long. Setting userID to nil removes the user ID.
+ (void) setUserPropertyString: (nullable NSString *)  value
forName: (nonnull NSString *)  name 

Sets a user property to a given value. Up to 25 user property names are supported. Once set, user property values persist throughout the app lifecycle and across sessions.

The following user property names are reserved and cannot be used:

  • first_open_time
  • last_deep_link_referrer
  • user_id
Parameters
valueThe value of the user property. Values can be up to 36 characters long. Setting the value to nil removes the user property.
nameThe name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The "firebase_" prefix is reserved and should not be used for user property names.

The documentation for this class was generated from the following file: