@@ -65,24 +65,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
65
65
// **************************************************
66
66
67
67
// ---- Create the Event Dispatcher ----
68
- let eventDispatcher = OPTLYEventDispatcherDefault . init ( builder: OPTLYEventDispatcherBuilder . init ( block: { ( builder) in
68
+ let eventDispatcher = OPTLYEventDispatcherDefault ( builder: OPTLYEventDispatcherBuilder ( block: { ( builder) in
69
69
builder? . eventDispatcherDispatchInterval = self . eventDispatcherDispatchInterval
70
70
builder? . logger = OPTLYLoggerDefault . init ( logLevel: . debug)
71
71
} ) )
72
72
73
73
// ---- Create the Datafile Manager ----
74
- let datafileManager = OPTLYDatafileManagerDefault . init ( builder: OPTLYDatafileManagerBuilder . init ( block: { ( builder) in
74
+ let datafileManager = OPTLYDatafileManagerDefault ( builder: OPTLYDatafileManagerBuilder ( block: { ( builder) in
75
75
// builder!.datafileFetchInterval = TimeInterval(self.datafileManagerDownloadInterval)
76
- builder!. datafileConfig = OPTLYDatafileConfig ( projectId: self . projectId, withSDKKey: nil ) !;
77
- }
76
+ builder!. datafileConfig = OPTLYDatafileConfig ( projectId: nil , withSDKKey: " 6hmwpgZcRFp36wH5QLK8Sb " ) !;
77
+
78
+ } ) )
78
79
79
- // ---- Create the Manager ----
80
- let optimizelyManager = OPTLYManager . init ( builder: OPTLYManagerBuilder . init ( block: { ( builder) in
80
+ let builder = OPTLYManagerBuilder ( block: { ( builder) in
81
81
builder!. projectId = nil ;
82
82
builder!. sdkKey = self . projectId
83
83
builder!. datafileManager = datafileManager!
84
84
builder!. eventDispatcher = eventDispatcher
85
- } ) )
85
+ } )
86
+
87
+ // ---- Create the Manager ----
88
+ var optimizelyManager = OPTLYManager ( builder: builder)
89
+
90
+ optimizelyManager? . datafileConfig = datafileManager? . datafileConfig
86
91
87
92
// After creating the client, there are three different ways to intialize the manager:
88
93
0 commit comments