1 #import <Foundation/Foundation.h>
3 #import "FIRAnalytics.h"
5 NS_ASSUME_NONNULL_BEGIN
8 * Provides App Delegate handlers to be used in your App Delegate.
10 * To save time integrating Firebase Analytics in an application, Firebase Analytics does not
11 * require delegation implementation from the AppDelegate. Instead this is automatically done by
12 * Firebase Analytics. Should you choose instead to delegate manually, you can turn off the App
13 * Delegate Proxy by adding FirebaseAppDelegateProxyEnabled into your app's Info.plist and setting
14 * it to NO, and adding the methods in this category to corresponding delegation handlers.
16 * To handle Universal Links, you must return YES in
17 * [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
19 @interface FIRAnalytics (AppDelegate)
22 * Handles events related to a URL session that are waiting to be processed.
24 * For optimal use of Firebase Analytics, call this method from the
25 * [UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler]
26 * method of the app delegate in your app.
28 * @param identifier The identifier of the URL session requiring attention.
29 * @param completionHandler The completion handler to call when you finish processing the events.
30 * Calling this completion handler lets the system know that your app's user interface is
31 * updated and a new snapshot can be taken.
33 + (void)handleEventsForBackgroundURLSession:(NSString *)identifier
34 completionHandler:(nullable void (^)(void))completionHandler;
37 * Handles the event when the app is launched by a URL.
39 * Call this method from [UIApplicationDelegate application:openURL:options:] (on iOS 9.0 and
40 * above), or [UIApplicationDelegate application:openURL:sourceApplication:annotation:] (on
41 * iOS 8.x and below) in your app.
43 * @param url The URL resource to open. This resource can be a network resource or a file.
45 + (void)handleOpenURL:(NSURL *)url;
48 * Handles the event when the app receives data associated with user activity that includes a
49 * Universal Link (on iOS 9.0 and above).
51 * Call this method from [UIApplication continueUserActivity:restorationHandler:] in your app
52 * delegate (on iOS 9.0 and above).
54 * @param userActivity The activity object containing the data associated with the task the user
57 + (void)handleUserActivity:(id)userActivity;