init Segment on app startup, but crashed

Hi all,

I’m try using Segment api in my expo app.
When I try use

Segment.initialize({ ANDROID_WRITE_KEY, IOS_WRITE_KEY });

in componentDidMount for useEffect part in react component,
the program crashed.

The app is running in ios simulator with expo client(ver:2.15.4)

By the way, more detailed tutorials about expo-analytics-segment is welcome.

Expo CLI 3.15.4 environment info:
OS: macOS Mojave 10.14.6
Shell: 5.3 - /bin/zsh
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.10.2 - ~/.nvm/versions/node/v10.16.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Android Studio: 3.6 AI-192.7142.36.36.6241897
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
expo: ~37.0.9 => 37.0.10
react: ~16.9.0 => 16.9.0
react-native: => 0.61.4
expo-cli: 3.15.4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.