betaacid / expo-analytics

Google Analytics integration for use with React Native apps built on Expo
MIT License
286 stars 64 forks source link

SDK 31 getWebviewUserAgentAsync is not a function #43

Closed pckz closed 4 years ago

pckz commented 5 years ago

Hello I'm using Expo SDK 31 with this lib, and my app works well until if I use this lib with the basic code:

const analytics = new Analytics('UA-XXXXXX-Y'); analytics.hit(new PageHit('Home')) .then(() => console.log("success")) .catch(e => console.log(e.message));

If I comment that lines the app works well.

What can I do to solve this? Thanks

Simulator Screen Shot - iPhone 7 - 2019-07-09 at 11 20 33

erm1lov commented 4 years ago
ryanvanderpol commented 4 years ago

@pckz as @erm1lov suggested, try pinning your version of this package to 1.0.8. Seems that Expo SDK 33 introduced some non-backwards compatible changes.

pckz commented 4 years ago

It worked with "expo-analytics": "^1.0.8", Thanks @erm1lov && @ryanvanderpol !