amplitude / amplitude/Amplitude-ReactNative
[iOS] After switching apiKey Amplitude still log events to previous project
- Lingua principale
- TypeScript
- Stelle
- 87
- Fork
- 21
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
We have an environment switcher in our application. On env switch, we restart our app and initialize Amplitude with a new apiKey. But, no matter how many envs we switch, the events still log to the first project
```
AsyncStorage.getItem('API').then(env => {
const ampInstance = Amplitude.getInstance();
if (env && env !== PROD_API) {
ampInstance.init(DEV_ANALYTICS_KEY);
ampInstance.trackingSessionEvents(true);
} else {
ampInstance.init(PROD_ANALYTICS_KEY);
ampInstance.trackingSessionEvents(true);
}
});
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.