PostHog.setup issue only occurs in android studio with xcode. The error it produces is "apiKey must not be null or empty ". In ios it works perfectly which seems strange to me, i'm not sure what i'm doing wrong the function is used as follows
import Posthog from 'posthog-react-native';
import Gleap from 'react-native-gleapsdk'
export default function App() {
useAutoUpdateAppHandler({
versionUrl: config.versionUrl,
versionRelease: config.versionRelease,
appName: 'UPchieve',
});
Posthog.setup(posthogConfig.token, posthogConfig.settings)
Gleap.initialize(gleapConfig.token)
}
this is the config
const Config = {
demo: {
webSocketUrl: 'https:...',
socketUrl: 'wss://demo....',
baseUrl: 'https://demo....',
versionUrl: 'https://cdn....',
versionRelease: '2.0.0',
},
prod: {
baseUrl: 'https://...',
},
posthog: {
token: '',
settings: {
host: 'https://...',
captureApplicationLifecycleEvents: true,
captureDeepLinks: true,
iOS: {
capturePushNotifications: true,
}
}
},
}