didomi / react-native

Didomi SDK for React Native
Other
9 stars 2 forks source link

onReady does nothing #61

Closed OmedMilat closed 1 year ago

OmedMilat commented 1 year ago

Since upgrading to React Native 0.70.2, the onReady method does not return a value. Meaning the Didomi UI will never be rendered. Issue occurs on Android 11, 13 & iOS 16.

"@didomi/react-native": "1.11.1",
"react": "18.2.0",
"react-native": "0.70.2",
await Didomi.onReady(); <-- will never be ready

console.log("This log will never be shown");

Didomi.initialize(
    'xxxx',
    undefined,
    remoteUrl,
    undefined,
    false,
    undefined,
);

Didomi.setupUI();
....

Followed docs: https://developers.didomi.io/cmp/mobile-sdk/react-native/setup

The code gets executed after the app has started

OmedMilat commented 1 year ago

Got it working again by removing "Didomi.onReady();".