betaacid / expo-analytics

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

User agent caching and static option. #45

Closed musemind closed 4 years ago

musemind commented 4 years ago

Caching the userAgent http header and give the ability to use custom userAgent http headers as an additional option. Background: The method getWebbviewUserAgentAsync can cause the error The WKWWebView was invalidated on iOS. This happened in our app >2k times. Caching the result of getWebbviewUserAgentAsync is fine because it is constant. (expo-constants)

musemind commented 4 years ago

Related to: https://forums.expo.io/t/unhandled-promise-rejection-error-the-wkwebview-was-invalidated/25044/3

ryanvanderpol commented 4 years ago

@musemind thanks for this! Does this change work in Expo SDK versions < 33?

musemind commented 4 years ago

@ryanvanderpol not more than the existing "Breaking Changes in Expo SDK 33".