Skip to content

Commit 4ed698f

Browse files
author
sozinov
committed
WMSDK-553: support RN 0.82 for simple integration
1 parent c68a8dc commit 4ed698f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

android/src/main/java/com/mindboxsdk/MindboxSdkLifecycleListener.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,13 @@ internal class MindboxSdkLifecycleListener private constructor(
143143

144144

145145
private fun getReactInstanceManager(): ReactInstanceManager? =
146-
application.getReactApplication()?.reactNativeHost?.reactInstanceManager
146+
runCatching {
147+
application.getReactApplication()
148+
?.reactNativeHost
149+
?.reactInstanceManager
150+
}.onFailure {
151+
Mindbox.writeLog("[RN] Bridgeless: ReactInstanceManager unsupported. Fallback to ReactHost", Level.INFO)
152+
}.getOrNull()
147153

148154
private fun Application.getReactApplication() = this as? ReactApplication
149155

0 commit comments

Comments
 (0)