@screeb/react-native 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/ScreebModule.swift +8 -7
- package/package.json +1 -1
package/ios/ScreebModule.swift
CHANGED
|
@@ -26,12 +26,13 @@ class ScreebModule: RCTEventEmitter {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
|
|
30
|
+
DispatchQueue.main.async {
|
|
31
|
+
if let controller = UIApplication.shared.keyWindow?.rootViewController {
|
|
32
|
+
Screeb.initSdk(context: controller, channelId: channelId, identity: userId_, visitorProperty: map, hooks: mapHooks)
|
|
33
|
+
} else {
|
|
34
34
|
print("Screeb : error init, could not find rootViewController")
|
|
35
|
+
}
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -90,7 +91,7 @@ class ScreebModule: RCTEventEmitter {
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
DispatchQueue.main.async {
|
|
93
|
-
|
|
94
|
+
Screeb.startSurvey(surveyId: surveyId, allowMultipleResponses: allowMultipleResponses_, hiddenFields: map, ignoreSurveyStatus: ignoreSurveyStatus_, hooks: mapHooks)
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
|
|
@@ -155,7 +156,7 @@ class ScreebModule: RCTEventEmitter {
|
|
|
155
156
|
return nil
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
|
|
159
|
+
|
|
159
160
|
override func supportedEvents() -> [String]! {
|
|
160
161
|
return ["ScreebEvent"]
|
|
161
162
|
}
|