ABTConstants.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2019 Google
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import <Foundation/Foundation.h>
  15. #import "FirebaseCore/Extension/FIRLogger.h"
  16. #define ABT_MSEC_PER_SEC 1000ull
  17. #pragma mark - Keys for experiment dictionaries.
  18. static NSString *const kABTExperimentDictionaryCreationTimestampKey = @"creationTimestamp";
  19. static NSString *const kABTExperimentDictionaryExperimentIDKey = @"name";
  20. static NSString *const kABTExperimentDictionaryExpiredEventKey = @"expiredEvent";
  21. static NSString *const kABTExperimentDictionaryOriginKey = @"origin";
  22. static NSString *const kABTExperimentDictionaryTimedOutEventKey = @"timedOutEvent";
  23. static NSString *const kABTExperimentDictionaryTimeToLiveKey = @"timeToLive";
  24. static NSString *const kABTExperimentDictionaryTriggeredEventKey = @"triggeredEvent";
  25. static NSString *const kABTExperimentDictionaryTriggeredEventNameKey = @"triggerEventName";
  26. static NSString *const kABTExperimentDictionaryTriggerTimeoutKey = @"triggerTimeout";
  27. static NSString *const kABTExperimentDictionaryVariantIDKey = @"value";
  28. #pragma mark - Keys for event dictionaries.
  29. static NSString *const kABTEventDictionaryNameKey = @"name";
  30. static NSString *const kABTEventDictionaryOriginKey = @"origin";
  31. static NSString *const kABTEventDictionaryParametersKey = @"parameters";
  32. static NSString *const kABTEventDictionaryTimestampKey = @"timestamp";
  33. #pragma mark - Errors
  34. static NSString *const kABTErrorDomain = @"com.google.abtesting";
  35. typedef NS_ENUM(NSUInteger, ABTInternalErrorCode) {
  36. kABTInternalErrorFailedToFetchConditionalUserProperties = 1
  37. };
  38. #pragma mark - Logger Service String
  39. extern FIRLoggerService kFIRLoggerABTesting;