You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.4 KiB

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