diff --git a/app/app.js b/app/app.js index 91818f1d9..a720c1bdb 100644 --- a/app/app.js +++ b/app/app.js @@ -2,7 +2,7 @@ // See LICENSE.txt for license information. /* eslint-disable global-require*/ -import {AsyncStorage, Linking, NativeModules} from 'react-native'; +import {AsyncStorage, Linking, NativeModules, Platform} from 'react-native'; import {setGenericPassword, getGenericPassword, resetGenericPassword} from 'react-native-keychain'; import {loadMe} from 'mattermost-redux/actions/users'; @@ -51,6 +51,14 @@ export default class App { this.token = null; this.url = null; + // Load polyfill for iOS 9 + if (Platform.OS === 'ios') { + const majorVersionIOS = parseInt(Platform.Version, 10); + if (majorVersionIOS < 10) { + require('babel-polyfill'); + } + } + // Usage deeplinking Linking.addEventListener('url', this.handleDeepLink);