Explorar el Código

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

It doesn't seem to work properly.
master
Saúl Ibarra Corretgé hace 7 años
padre
commit
5ff1ce5a60

+ 13
- 1
react/features/recording/components/LiveStream/GoogleSigninForm.native.js Ver fichero

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
-import { Text, View } from 'react-native';
4
+import { Platform, Text, View } from 'react-native';
5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
 import { translate } from '../../../base/i18n';
7
 import { translate } from '../../../base/i18n';
74
      * @inheritdoc
74
      * @inheritdoc
75
      */
75
      */
76
     componentDidMount() {
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
         googleApi.hasPlayServices()
89
         googleApi.hasPlayServices()
78
             .then(() => {
90
             .then(() => {
79
                 googleApi.configure({
91
                 googleApi.configure({

Loading…
Cancelar
Guardar