-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
SDK version:
"react-native": "0.76.7",
"expo": "^52.0.37",
"customerio-expo-plugin": "^2.0.2",
"customerio-reactnative": "4.2.4",
Describe the issue
I have an app that operates in two major regions that have separate workspaces and credentials.
I want to be able to reinitialise the SDK with the correct keys when the region is changed within the app.
It seems like this is not possible at the moment?
Calling CustomerIO.initialize(config)
multiple times results in a console warning and the SDK instance keeps using the original config.
Reloading the app using Expo's .reloadAsync
on region change and then initialising the SDK, causes the SDK to fully stop working. I think .reloadAsync
reloads only the JS bundle, but there is probably some state preserved in the native modules which causes the issue.
- Is that expected behaviour and what would you suggest to fix the issue?
- How hard would it be to reset the native module state?
Thank you!
Jonic