1 |
efrain |
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 |
|
|
|
15 |
#import <Foundation/Foundation.h>
|
|
|
16 |
#import "FirebaseCore/Sources/Private/FIRLogger.h"
|
|
|
17 |
|
|
|
18 |
#define ABT_MSEC_PER_SEC 1000ull
|
|
|
19 |
|
|
|
20 |
#pragma mark - Keys for experiment dictionaries.
|
|
|
21 |
|
|
|
22 |
static NSString *const kABTExperimentDictionaryCreationTimestampKey = @"creationTimestamp";
|
|
|
23 |
static NSString *const kABTExperimentDictionaryExperimentIDKey = @"name";
|
|
|
24 |
static NSString *const kABTExperimentDictionaryExpiredEventKey = @"expiredEvent";
|
|
|
25 |
static NSString *const kABTExperimentDictionaryOriginKey = @"origin";
|
|
|
26 |
static NSString *const kABTExperimentDictionaryTimedOutEventKey = @"timedOutEvent";
|
|
|
27 |
static NSString *const kABTExperimentDictionaryTimeToLiveKey = @"timeToLive";
|
|
|
28 |
static NSString *const kABTExperimentDictionaryTriggeredEventKey = @"triggeredEvent";
|
|
|
29 |
static NSString *const kABTExperimentDictionaryTriggeredEventNameKey = @"triggerEventName";
|
|
|
30 |
static NSString *const kABTExperimentDictionaryTriggerTimeoutKey = @"triggerTimeout";
|
|
|
31 |
static NSString *const kABTExperimentDictionaryVariantIDKey = @"value";
|
|
|
32 |
|
|
|
33 |
#pragma mark - Keys for event dictionaries.
|
|
|
34 |
|
|
|
35 |
static NSString *const kABTEventDictionaryNameKey = @"name";
|
|
|
36 |
static NSString *const kABTEventDictionaryOriginKey = @"origin";
|
|
|
37 |
static NSString *const kABTEventDictionaryParametersKey = @"parameters";
|
|
|
38 |
static NSString *const kABTEventDictionaryTimestampKey = @"timestamp";
|
|
|
39 |
|
|
|
40 |
#pragma mark - Errors
|
|
|
41 |
|
|
|
42 |
static NSString *const kABTErrorDomain = @"com.google.abtesting";
|
|
|
43 |
|
|
|
44 |
typedef NS_ENUM(NSUInteger, ABTInternalErrorCode) {
|
|
|
45 |
kABTInternalErrorFailedToFetchConditionalUserProperties = 1
|
|
|
46 |
};
|
|
|
47 |
|
|
|
48 |
#pragma mark - Logger Service String
|
|
|
49 |
|
|
|
50 |
extern FIRLoggerService kFIRLoggerABTesting;
|