FBSDKTimeSpentData.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. #import <FBSDKCoreKit/FBSDKSourceApplicationTracking.h>
  9. #import <FBSDKCoreKit/FBSDKTimeSpentRecording.h>
  10. #import <Foundation/Foundation.h>
  11. @protocol FBSDKEventLogging;
  12. @protocol FBSDKServerConfigurationProviding;
  13. NS_ASSUME_NONNULL_BEGIN
  14. /**
  15. Internal type exposed to facilitate transition to Swift.
  16. API Subject to change or removal without warning. Do not use.
  17. @warning INTERNAL - DO NOT USE
  18. */
  19. // Class to encapsulate persisting of time spent data collected by [FBSDKAppEvents.shared activateApp]. The activate app App Event is
  20. // logged when restore: is called with sufficient time since the last deactivation.
  21. NS_SWIFT_NAME(_TimeSpentData)
  22. @interface FBSDKTimeSpentData : NSObject <FBSDKSourceApplicationTracking, FBSDKTimeSpentRecording>
  23. + (instancetype)new NS_UNAVAILABLE;
  24. - (instancetype)init NS_UNAVAILABLE;
  25. - (instancetype)initWithEventLogger:(id<FBSDKEventLogging>)eventLogger
  26. serverConfigurationProvider:(id<FBSDKServerConfigurationProviding>)serverConfigurationProvider;
  27. - (void)setSourceApplication:(nullable NSString *)sourceApplication openURL:(nullable NSURL *)url;
  28. - (void)setSourceApplication:(nullable NSString *)sourceApplication isFromAppLink:(BOOL)isFromAppLink;
  29. - (void)registerAutoResetSourceApplication;
  30. - (void)suspend;
  31. - (void)restore:(BOOL)calledFromActivateApp;
  32. @end
  33. NS_ASSUME_NONNULL_END