Преглед на файлове

[iOS] Don't show google signin button on iOS <= 10

It doesn't seem to work properly.
master
Saúl Ibarra Corretgé преди 6 години
родител
ревизия
5ff1ce5a60
променени са 1 файла, в които са добавени 13 реда и са изтрити 1 реда
  1. 13
    1
      react/features/recording/components/LiveStream/GoogleSigninForm.native.js

+ 13
- 1
react/features/recording/components/LiveStream/GoogleSigninForm.native.js Целия файл

@@ -1,7 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import React, { Component } from 'react';
4
-import { Text, View } from 'react-native';
4
+import { Platform, Text, View } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7 7
 import { translate } from '../../../base/i18n';
@@ -74,6 +74,18 @@ class GoogleSigninForm extends Component<Props> {
74 74
      * @inheritdoc
75 75
      */
76 76
     componentDidMount() {
77
+        if (Platform.OS === 'ios') {
78
+            const majorVersionIOS = parseInt(Platform.Version, 10);
79
+
80
+            if (majorVersionIOS <= 10) {
81
+                // Disable it on iOS 10 and earlier, since it doesn't work
82
+                // properly.
83
+                this._setApiState(GOOGLE_API_STATES.NOT_AVAILABLE);
84
+
85
+                return;
86
+            }
87
+        }
88
+
77 89
         googleApi.hasPlayServices()
78 90
             .then(() => {
79 91
                 googleApi.configure({

Loading…
Отказ
Запис