Skip to content

Commit 544febd

Browse files
Alda/simplify api (#189)
* Added an isDatafileCached getter for the datafile manager protocol. This is needed for the manager base class to help with the simplified initialization. * Added two new APIs that simplify initialization. * Updated code comments. * Clean up. * Add code comment. * Added a default user profile service if one is not provided to make the builder initialization consistent for the manager. * Added sample code in the demo app for the simplified init APIs. * Added tests for the new init methods. * Renamed the datafile in the test bundle to the new naming convention. * Cealn up.
1 parent b57535a commit 544febd

File tree

42 files changed

+593
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+593
-119
lines changed

OptimizelyDemoApp/AppDelegate.swift

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
121121

122122
// ---- Create the Datafile Manager ----
123123
let datafileManager = OPTLYDatafileManagerDefault.init{(builder) in
124-
builder!.datafileFetchInterval = TimeInterval(self.datafileManagerDownloadInterval)
124+
// builder!.datafileFetchInterval = TimeInterval(self.datafileManagerDownloadInterval)
125125
builder!.projectId = self.projectId
126126
}
127127

@@ -134,14 +134,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
134134

135135
// After creating the client, there are three different ways to intialize the manager:
136136

137-
// ---- 1. Asynchronous Initialization -----
138-
// initialize Optimizely Client from a datafile download
139-
optimizelyManager?.initialize(callback: { [weak self] (error, optimizelyClient) in
140-
let variation = optimizelyClient?.activate((self?.experimentKey)!, userId: (self?.userId)!, attributes: (self?.attributes))
137+
// --- 1. Synchronous Initialization with fallback ----
138+
// let optimizelyClient = optimizelyManager?.initializeSync(projectId)
139+
// let variation = optimizelyClient?.activate(self.experimentKey, userId:self.userId, attributes: self.attributes)
140+
// self.setRootViewController(optimizelyClient: optimizelyClient, bucketedVariation:variation)
141+
142+
// --- 2. Asynchronous Initialization with fallback ----
143+
optimizelyManager?.initializeAsync(projectId, callback: { [weak self] (error, optimizelyClient) in
144+
let variation = optimizelyClient?.activate((self?.experimentKey)!, userId:(self?.userId)!, attributes:(self?.attributes))
141145
self?.setRootViewController(optimizelyClient: optimizelyClient, bucketedVariation:variation)
142146
})
143147

144-
// ---- 2. Synchronous Initialization with Datafile ----
148+
// ---- 3. Asynchronous Initialization -----
149+
// initialize Optimizely Client from a datafile download
150+
// optimizelyManager?.initialize(callback: { [weak self] (error, optimizelyClient) in
151+
// let variation = optimizelyClient?.activate((self?.experimentKey)!, userId: (self?.userId)!, attributes: (self?.attributes))
152+
// self?.setRootViewController(optimizelyClient: optimizelyClient, bucketedVariation:variation)
153+
// })
154+
155+
// ---- 4. Synchronous Initialization with Datafile ----
145156
// load the datafile from the app bundle
146157
// let bundle = Bundle.init(for: self.classForCoder)
147158
// let filePath = bundle.path(forResource: datafileName, ofType: "json")
@@ -158,7 +169,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
158169
// let variation = optimizelyClient?.activate(self.experimentKey, userId:self.userId, attributes: self.attributes)
159170
// self.setRootViewController(optimizelyClient: optimizelyClient, bucketedVariation:variation)
160171

161-
// --- 3. Synchronous Initialization with Saved Datafile ----
172+
// --- 5. Synchronous Initialization with Saved Datafile ----
162173
// let optimizelyClient = optimizelyManager?.initialize()
163174
// let variation = optimizelyClient?.activate(self.experimentKey, userId:self.userId, attributes: self.attributes)
164175
// self.setRootViewController(optimizelyClient: optimizelyClient, bucketedVariation:variation)

OptimizelyDemoApp/OptimizelyDemoApp.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
EA70FFF11E552E9E00590BEF /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EA70FFC31E552D0B00590BEF /* Roboto-Medium.ttf */; };
5757
EA70FFF41E552E9E00590BEF /* SF-UI-Text-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = EA70FFC41E552D0B00590BEF /* SF-UI-Text-Regular.otf */; };
5858
EA70FFF51E552E9E00590BEF /* ProximaNovaCond-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = EA70FFC21E552D0B00590BEF /* ProximaNovaCond-Regular.otf */; };
59+
EAF6953E1FA08DD900C73CC2 /* optimizely_8182362857.json in Resources */ = {isa = PBXBuildFile; fileRef = EAF6953D1FA08DD900C73CC2 /* optimizely_8182362857.json */; };
5960
/* End PBXBuildFile section */
6061

6162
/* Begin PBXContainerItemProxy section */
@@ -187,6 +188,8 @@
187188
EA70FFC31E552D0B00590BEF /* Roboto-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Medium.ttf"; path = "Resources/Roboto-Medium.ttf"; sourceTree = "<group>"; };
188189
EA70FFC41E552D0B00590BEF /* SF-UI-Text-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "SF-UI-Text-Regular.otf"; path = "Resources/SF-UI-Text-Regular.otf"; sourceTree = "<group>"; };
189190
EA70FFFE1E552E9E00590BEF /* OptimizelyiOSDemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OptimizelyiOSDemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
191+
EAF6953A1FA07BF800C73CC2 /* optimizely_6372300739.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = optimizely_6372300739.json; path = ../OptimizelySDKShared/OptimizelySDKSharedTests/TestData/optimizely_6372300739.json; sourceTree = "<group>"; };
192+
EAF6953D1FA08DD900C73CC2 /* optimizely_8182362857.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = optimizely_8182362857.json; path = Resources/optimizely_8182362857.json; sourceTree = "<group>"; };
190193
FB253CD2AFE817883A1832B5 /* Pods-OptimizelyTVOSDemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OptimizelyTVOSDemoApp.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-OptimizelyTVOSDemoApp/Pods-OptimizelyTVOSDemoApp.debug.xcconfig"; sourceTree = "<group>"; };
191194
/* End PBXFileReference section */
192195

@@ -250,6 +253,8 @@
250253
EA70FFC31E552D0B00590BEF /* Roboto-Medium.ttf */,
251254
EA70FFC41E552D0B00590BEF /* SF-UI-Text-Regular.otf */,
252255
EA4A62BA1E566F3500F1C3CE /* demoTestDatafile.json */,
256+
EAF6953A1FA07BF800C73CC2 /* optimizely_6372300739.json */,
257+
EAF6953D1FA08DD900C73CC2 /* optimizely_8182362857.json */,
253258
);
254259
name = Resources;
255260
sourceTree = "<group>";
@@ -481,6 +486,7 @@
481486
EA70FFF41E552E9E00590BEF /* SF-UI-Text-Regular.otf in Resources */,
482487
EA299EEF1E55316300931399 /* Assets.xcassets in Resources */,
483488
EA70FFF51E552E9E00590BEF /* ProximaNovaCond-Regular.otf in Resources */,
489+
EAF6953E1FA08DD900C73CC2 /* optimizely_8182362857.json in Resources */,
484490
);
485491
runOnlyForDeploymentPostprocessing = 0;
486492
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"groups": [], "projectId": "8182362857", "variables": [{"defaultValue": "true", "type": "boolean", "id": "8174853270", "key": "sample_variable_boolean"}, {"defaultValue": "0.0", "type": "double", "id": "8175055404", "key": "sample_variable_double"}, {"defaultValue": "0", "type": "integer", "id": "8177539581", "key": "sample_variable_integer"}, {"defaultValue": "default", "type": "string", "id": "8177990329", "key": "sample_variable_string"}], "version": "3", "experiments": [{"status": "Running", "key": "background_experiment", "layerId": "8174477208", "trafficAllocation": [{"entityId": "8177401270", "endOfRange": 10000}], "audienceIds": ["8179612088"], "variations": [{"variables": [{"id": "8177539581", "value": "0"}, {"id": "8177990329", "value": "default"}, {"id": "8174853270", "value": "true"}, {"id": "8175055404", "value": "0.0"}], "id": "8182320831", "key": "variation_a"}, {"variables": [{"id": "8177539581", "value": "0"}, {"id": "8177990329", "value": "default"}, {"id": "8174853270", "value": "true"}, {"id": "8175055404", "value": "0.0"}], "id": "8177401270", "key": "variation_b"}], "forcedVariations": {}, "id": "8183190141"}], "audiences": [{"conditions": "[\"and\", [\"or\", [\"or\", {\"name\": \"sample_attribute_key\", \"type\": \"custom_attribute\", \"value\": \"sample_attribute_value\"}]]]", "id": "8179612088", "name": "sample_audience"}, {"conditions": "[\"and\", [\"or\", [\"or\", {\"name\": \"sample_attribute_key_2\", \"type\": \"custom_attribute\", \"value\": \"a\"}], [\"or\", {\"name\": \"sample_attribute_key_2\", \"type\": \"custom_attribute\", \"value\": \"b\"}], [\"or\", {\"name\": \"sample_attribute_key_2\", \"type\": \"custom_attribute\", \"value\": \"c\"}]]]", "id": "8853260009", "name": "sample_audience_2"}], "anonymizeIP": false, "attributes": [{"id": "8172478122", "key": "sample_attribute_key"}, {"id": "8834562451", "key": "sample_attribute_key_2"}], "revision": "65", "events": [{"experimentIds": ["8183190141"], "id": "8182211634", "key": "sample_conversion"}], "accountId": "6384711706"}

OptimizelySDKCore/OptimizelySDKCore.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,16 @@
299299
EA2FABC41DC6FDFA00B1D81B /* OPTLYTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = EA2FAB921DC6FDFA00B1D81B /* OPTLYTestHelper.m */; };
300300
EA2FABC91DC6FDFA00B1D81B /* BucketerTestsDatafile.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB951DC6FDFA00B1D81B /* BucketerTestsDatafile.json */; };
301301
EA2FABCA1DC6FDFA00B1D81B /* BucketerTestsDatafile.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB951DC6FDFA00B1D81B /* BucketerTestsDatafile.json */; };
302-
EA2FABCC1DC6FDFA00B1D81B /* datafile_6372300739.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB961DC6FDFA00B1D81B /* datafile_6372300739.json */; };
303-
EA2FABCD1DC6FDFA00B1D81B /* datafile_6372300739.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB961DC6FDFA00B1D81B /* datafile_6372300739.json */; };
302+
EA2FABCC1DC6FDFA00B1D81B /* optimizely_6372300739.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB961DC6FDFA00B1D81B /* optimizely_6372300739.json */; };
303+
EA2FABCD1DC6FDFA00B1D81B /* optimizely_6372300739.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB961DC6FDFA00B1D81B /* optimizely_6372300739.json */; };
304304
EA2FABCF1DC6FDFA00B1D81B /* test_data_10_experiments.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB971DC6FDFA00B1D81B /* test_data_10_experiments.json */; };
305305
EA2FABD01DC6FDFA00B1D81B /* test_data_10_experiments.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB971DC6FDFA00B1D81B /* test_data_10_experiments.json */; };
306306
EA2FABD21DC6FDFA00B1D81B /* test_data_25_experiments.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB981DC6FDFA00B1D81B /* test_data_25_experiments.json */; };
307307
EA2FABD31DC6FDFA00B1D81B /* test_data_25_experiments.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB981DC6FDFA00B1D81B /* test_data_25_experiments.json */; };
308308
EA2FABD51DC6FDFA00B1D81B /* test_data_50_experiments.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB991DC6FDFA00B1D81B /* test_data_50_experiments.json */; };
309309
EA2FABD61DC6FDFA00B1D81B /* test_data_50_experiments.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB991DC6FDFA00B1D81B /* test_data_50_experiments.json */; };
310-
EA2FABD81DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB9A1DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json */; };
311-
EA2FABD91DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB9A1DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json */; };
310+
EA2FABD81DC6FDFA00B1D81B /* optimizely_7519590183.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB9A1DC6FDFA00B1D81B /* optimizely_7519590183.json */; };
311+
EA2FABD91DC6FDFA00B1D81B /* optimizely_7519590183.json in Resources */ = {isa = PBXBuildFile; fileRef = EA2FAB9A1DC6FDFA00B1D81B /* optimizely_7519590183.json */; };
312312
EA2FABE21DC6FFA100B1D81B /* Optimizely.m in Sources */ = {isa = PBXBuildFile; fileRef = EA2FAA4A1DC6F53E00B1D81B /* Optimizely.m */; };
313313
EA2FABE31DC6FFA100B1D81B /* OPTLYBucketer.m in Sources */ = {isa = PBXBuildFile; fileRef = EA2FAB261DC6F59100B1D81B /* OPTLYBucketer.m */; };
314314
EA2FABE41DC6FFA100B1D81B /* OPTLYBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = EA2FAB1E1DC6F58800B1D81B /* OPTLYBuilder.m */; };
@@ -660,11 +660,11 @@
660660
EA2FAB911DC6FDFA00B1D81B /* OPTLYTestHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPTLYTestHelper.h; sourceTree = "<group>"; };
661661
EA2FAB921DC6FDFA00B1D81B /* OPTLYTestHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPTLYTestHelper.m; sourceTree = "<group>"; };
662662
EA2FAB951DC6FDFA00B1D81B /* BucketerTestsDatafile.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = BucketerTestsDatafile.json; sourceTree = "<group>"; };
663-
EA2FAB961DC6FDFA00B1D81B /* datafile_6372300739.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = datafile_6372300739.json; sourceTree = "<group>"; };
663+
EA2FAB961DC6FDFA00B1D81B /* optimizely_6372300739.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = optimizely_6372300739.json; sourceTree = "<group>"; };
664664
EA2FAB971DC6FDFA00B1D81B /* test_data_10_experiments.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test_data_10_experiments.json; sourceTree = "<group>"; };
665665
EA2FAB981DC6FDFA00B1D81B /* test_data_25_experiments.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test_data_25_experiments.json; sourceTree = "<group>"; };
666666
EA2FAB991DC6FDFA00B1D81B /* test_data_50_experiments.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test_data_50_experiments.json; sourceTree = "<group>"; };
667-
EA2FAB9A1DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = validator_whitelisting_test_datafile.json; sourceTree = "<group>"; };
667+
EA2FAB9A1DC6FDFA00B1D81B /* optimizely_7519590183.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = optimizely_7519590183.json; sourceTree = "<group>"; };
668668
EA3C68081DC1E66C00C578CA /* OptimizelySDKCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OptimizelySDKCore.h; sourceTree = "<group>"; };
669669
EA3C680A1DC1E66C00C578CA /* OptimizelySDKCore-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OptimizelySDKCore-Info.plist"; sourceTree = "<group>"; };
670670
EA3C68161DC1E66C00C578CA /* OptimizelySDKCoreTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OptimizelySDKCoreTests-Info.plist"; sourceTree = "<group>"; };
@@ -1085,11 +1085,11 @@
10851085
children = (
10861086
EA2FAB951DC6FDFA00B1D81B /* BucketerTestsDatafile.json */,
10871087
3E92800D1F26AD4700214C58 /* BucketerTestsDatafile2.json */,
1088-
EA2FAB961DC6FDFA00B1D81B /* datafile_6372300739.json */,
1088+
EA2FAB961DC6FDFA00B1D81B /* optimizely_6372300739.json */,
10891089
EA2FAB971DC6FDFA00B1D81B /* test_data_10_experiments.json */,
10901090
EA2FAB981DC6FDFA00B1D81B /* test_data_25_experiments.json */,
10911091
EA2FAB991DC6FDFA00B1D81B /* test_data_50_experiments.json */,
1092-
EA2FAB9A1DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json */,
1092+
EA2FAB9A1DC6FDFA00B1D81B /* optimizely_7519590183.json */,
10931093
5E4C07F21DFF645C0042B1F8 /* InvalidDatafileVersionDatafile.json */,
10941094
);
10951095
path = TestData;
@@ -1553,8 +1553,8 @@
15531553
isa = PBXResourcesBuildPhase;
15541554
buildActionMask = 2147483647;
15551555
files = (
1556-
EA2FABCC1DC6FDFA00B1D81B /* datafile_6372300739.json in Resources */,
1557-
EA2FABD81DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json in Resources */,
1556+
EA2FABCC1DC6FDFA00B1D81B /* optimizely_6372300739.json in Resources */,
1557+
EA2FABD81DC6FDFA00B1D81B /* optimizely_7519590183.json in Resources */,
15581558
EA2FABD51DC6FDFA00B1D81B /* test_data_50_experiments.json in Resources */,
15591559
EA2FABCF1DC6FDFA00B1D81B /* test_data_10_experiments.json in Resources */,
15601560
5E4C07F31DFF645C0042B1F8 /* InvalidDatafileVersionDatafile.json in Resources */,
@@ -1576,8 +1576,8 @@
15761576
buildActionMask = 2147483647;
15771577
files = (
15781578
3E92800E1F26AD4700214C58 /* BucketerTestsDatafile2.json in Resources */,
1579-
EA2FABCD1DC6FDFA00B1D81B /* datafile_6372300739.json in Resources */,
1580-
EA2FABD91DC6FDFA00B1D81B /* validator_whitelisting_test_datafile.json in Resources */,
1579+
EA2FABCD1DC6FDFA00B1D81B /* optimizely_6372300739.json in Resources */,
1580+
EA2FABD91DC6FDFA00B1D81B /* optimizely_7519590183.json in Resources */,
15811581
EA2FABD61DC6FDFA00B1D81B /* test_data_50_experiments.json in Resources */,
15821582
EA2FABD01DC6FDFA00B1D81B /* test_data_10_experiments.json in Resources */,
15831583
5E4C07F41DFF645C0042B1F8 /* InvalidDatafileVersionDatafile.json in Resources */,

OptimizelySDKCore/OptimizelySDKCore/OPTLYLoggerMessages.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ extern NSString *const OPTLYLoggerMessagesManagerEventDispatcherDoesNotConformTo
160160
extern NSString *const OPTLYLoggerMessagesManagerLoggerDoesNotConformToOPTLYLoggerProtocol;
161161
extern NSString *const OPTLYLoggerMessagesManagerMustBeInitializedWithProjectId;
162162
extern NSString *const OPTLYLoggerMessagesManagerProjectIdCannotBeEmptyString;
163+
extern NSString *const OPTLYLoggerMessagesManagerSyncInit;
164+
extern NSString *const OPTLYLoggerMessagesManagerAsyncInit;
165+
extern NSString *const OPTLYLoggerMessagesManagerAsyncInitErrorDatafileDownload;
166+
extern NSString *const OPTLYLoggerMessagesManagerAsyncInitNoDatafileUpdates;
167+
extern NSString *const OPTLYLoggerMessagesManagerAttemptingBundleDataLoad;
168+
extern NSString *const OPTLYLoggerMessagesManagerBundleDataLoadError;
169+
extern NSString *const OPTLYLoggerMessagesManagerBundledDataLoaded;
163170

164171
// ---- Project Config Getters ----
165172
// debug

OptimizelySDKCore/OptimizelySDKCore/OPTLYLoggerMessages.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@
154154
NSString *const OPTLYLoggerMessagesManagerLoggerDoesNotConformToOPTLYLoggerProtocol = @"[MANAGER] Logger does not conform to the OPTLYLogger protocol.";
155155
NSString *const OPTLYLoggerMessagesManagerMustBeInitializedWithProjectId = @"[MANAGER] An Optimizely Manager instance must be initialized with a project ID.";
156156
NSString *const OPTLYLoggerMessagesManagerProjectIdCannotBeEmptyString = @"[MANAGER] The project ID for the Optimizely Manager instance cannot be an empty string";
157+
NSString *const OPTLYLoggerMessagesManagerSyncInit = @"[MANAGER] Synchronously initializing client with project ID %@.";
158+
NSString *const OPTLYLoggerMessagesManagerAsyncInit = @"[MANAGER] Asynchronously initializing client with project ID %@.";
159+
NSString *const OPTLYLoggerMessagesManagerAsyncInitErrorDatafileDownload = @"[MANAGER] Error downloading datafile: %@.";
160+
NSString *const OPTLYLoggerMessagesManagerAsyncInitNoDatafileUpdates = @"[MANAGER] Not downloading new datafile — no updates have been made.";
161+
NSString *const OPTLYLoggerMessagesManagerAttemptingBundleDataLoad = @"[MANAGER] Attempting to load the bundled datafile.";
162+
NSString *const OPTLYLoggerMessagesManagerBundleDataLoadError = @"[MANAGER] Unabled to load the bundled datafile because of the following error: %@";
163+
NSString *const OPTLYLoggerMessagesManagerBundledDataLoaded = @"[MANAGER] The bundled datafile %@ was loaded.";
157164

158165
// ---- Project Config Getters ----
159166
// warning

OptimizelySDKCore/OptimizelySDKCoreTests/OPTLYBuilderTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// static data from datafile
2626
static NSString * const kClientEngine = @"objective-c-sdk";
27-
static NSString * const kDataModelDatafileName = @"datafile_6372300739";
27+
static NSString * const kDataModelDatafileName = @"optimizely_6372300739";
2828
static NSData *datafile;
2929

3030
@interface OPTLYBuilderTest : XCTestCase

OptimizelySDKCore/OptimizelySDKCoreTests/OPTLYDecisionServiceTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
static NSString * const kUserNotInExperimentId = @"6358043286";
3434

3535
// whitelisting test constants
36-
static NSString * const kWhitelistingTestDatafileName = @"validator_whitelisting_test_datafile";
36+
static NSString * const kWhitelistingTestDatafileName = @"optimizely_7519590183";
3737
static NSString * const kWhitelistedUserId = @"whitelisted_user";
3838
static NSString * const kWhitelistedExperiment = @"whitelist_testing_experiment";
3939
static NSString * const kWhitelistedVariation = @"a";

OptimizelySDKCore/OptimizelySDKCoreTests/OPTLYNetworkServiceTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
static NSString *const kDatafileVersion = @"3";
2323

2424
static NSString *const kExpectedCDNURLTemplate = @"https://cdn.optimizely.com/public/%@/datafile_v%@.json";
25-
static NSString *const kDatamodelDatafileName = @"datafile_6372300739";
25+
static NSString *const kDatamodelDatafileName = @"optimizely_6372300739";
2626
static NSString *const kLastModifiedDate = @"Mon, 28 Nov 2016 06:10:59 GMT";
2727
static NSString *const kProjectId = @"6372300739";
2828

0 commit comments

Comments
 (0)