@@ -65,24 +65,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
6565 // **************************************************
6666
6767 // ---- Create the Event Dispatcher ----
68- let eventDispatcher = OPTLYEventDispatcherDefault . init ( builder: OPTLYEventDispatcherBuilder . init ( block: { ( builder) in
68+ let eventDispatcher = OPTLYEventDispatcherDefault ( builder: OPTLYEventDispatcherBuilder ( block: { ( builder) in
6969 builder? . eventDispatcherDispatchInterval = self . eventDispatcherDispatchInterval
7070 builder? . logger = OPTLYLoggerDefault . init ( logLevel: . debug)
7171 } ) )
7272
7373 // ---- Create the Datafile Manager ----
74- let datafileManager = OPTLYDatafileManagerDefault . init ( builder: OPTLYDatafileManagerBuilder . init ( block: { ( builder) in
74+ let datafileManager = OPTLYDatafileManagerDefault ( builder: OPTLYDatafileManagerBuilder ( block: { ( builder) in
7575 // 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+ } ) )
7879
79- // ---- Create the Manager ----
80- let optimizelyManager = OPTLYManager . init ( builder: OPTLYManagerBuilder . init ( block: { ( builder) in
80+ let builder = OPTLYManagerBuilder ( block: { ( builder) in
8181 builder!. projectId = nil ;
8282 builder!. sdkKey = self . projectId
8383 builder!. datafileManager = datafileManager!
8484 builder!. eventDispatcher = eventDispatcher
85- } ) )
85+ } )
86+
87+ // ---- Create the Manager ----
88+ var optimizelyManager = OPTLYManager ( builder: builder)
89+
90+ optimizelyManager? . datafileConfig = datafileManager? . datafileConfig
8691
8792 // After creating the client, there are three different ways to intialize the manager:
8893
0 commit comments