FIRAnalytics+AppDelegate.h 2.4 KB

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