react-native-pinch
react-native-pinch copied to clipboard
Add support for tls 1.2 on Android 4.1-4.4.
ReactNative supports Android >= API level 16, however, similar to the report in https://github.com/square/okhttp/issues/2372, Android has supported TLS 1.2 since API 16 (android 4.1) but enabled it by default only since API 20 (android "4.4W"). If pinch is used to try to make a connection from one of these devices, it will fail with a javax.net.ssl.SSLException
.
By testing on the Google Firebase device testing, this fixes the issue for devices at API level 18.
As written, this PR forces the use of TLS 1.2, which probably isn't desired in this library, if this makes sense to move forward, I can explore how to relax that requirement.