FIRAnalyticsInterop.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. @protocol FIRAnalyticsInteropListener;
  18. NS_ASSUME_NONNULL_BEGIN
  19. /// Connector for bridging communication between Firebase SDKs and FirebaseAnalytics API.
  20. @protocol FIRAnalyticsInterop
  21. /// Sets user property when trigger event is logged. This API is only available in the SDK.
  22. - (void)setConditionalUserProperty:(NSDictionary<NSString *, id> *)conditionalUserProperty;
  23. /// Clears user property if set.
  24. - (void)clearConditionalUserProperty:(NSString *)userPropertyName
  25. forOrigin:(NSString *)origin
  26. clearEventName:(NSString *)clearEventName
  27. clearEventParameters:(NSDictionary<NSString *, NSString *> *)clearEventParameters;
  28. /// Returns currently set user properties.
  29. - (NSArray<NSDictionary<NSString *, NSString *> *> *)conditionalUserProperties:(NSString *)origin
  30. propertyNamePrefix:
  31. (NSString *)propertyNamePrefix;
  32. /// Returns the maximum number of user properties.
  33. - (NSInteger)maxUserProperties:(NSString *)origin;
  34. /// Logs events.
  35. - (void)logEventWithOrigin:(NSString *)origin
  36. name:(NSString *)name
  37. parameters:(nullable NSDictionary<NSString *, id> *)parameters;
  38. /// Sets user property.
  39. - (void)setUserPropertyWithOrigin:(NSString *)origin name:(NSString *)name value:(id)value;
  40. /// Registers an Analytics listener for the given origin.
  41. - (void)registerAnalyticsListener:(id<FIRAnalyticsInteropListener>)listener
  42. withOrigin:(NSString *)origin;
  43. /// Unregisters an Analytics listener for the given origin.
  44. - (void)unregisterAnalyticsListenerWithOrigin:(NSString *)origin;
  45. @end
  46. NS_ASSUME_NONNULL_END