betaacid / expo-analytics

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

User agent caching and static option. #45

Closed musemind closed 5 years ago

musemind commented 5 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 5 years ago

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

ryanvanderpol commented 5 years ago

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

musemind commented 5 years ago

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