From 097244692cb2270f5115dc246af7927d55a34ad3 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Thu, 29 Mar 2018 16:17:19 +0300 Subject: [PATCH] Fix iOS Share Extension Crash and Bump build and version numbers (1.7) (#1556) * Fix iOS Extension crash * Bump app version to 1.7.1 and build to 92 --- android/app/build.gradle | 4 ++-- app/utils/file.js | 2 +- ios/Mattermost/Info.plist | 8 ++++---- ios/MattermostShare/Info.plist | 4 ++-- ios/MattermostTests/Info.plist | 4 ++-- share_extension/ios/index.js | 8 ++++++-- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ad3578719..7d2a3bcd3 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -111,8 +111,8 @@ android { applicationId "com.mattermost.rnbeta" minSdkVersion 21 targetSdkVersion 23 - versionCode 91 - versionName "1.7.0" + versionCode 92 + versionName "1.7.1" multiDexEnabled true ndk { abiFilters "armeabi-v7a", "x86" diff --git a/app/utils/file.js b/app/utils/file.js index 9f997abf3..895844d75 100644 --- a/app/utils/file.js +++ b/app/utils/file.js @@ -82,5 +82,5 @@ export const encodeHeaderURIStringToUTF8 = (string) => { }; export const getAllowedServerMaxFileSize = (config) => { - return config.MaxFileSize ? parseInt(config.MaxFileSize, 10) : DEFAULT_SERVER_MAX_FILE_SIZE; + return config && config.MaxFileSize ? parseInt(config.MaxFileSize, 10) : DEFAULT_SERVER_MAX_FILE_SIZE; }; diff --git a/ios/Mattermost/Info.plist b/ios/Mattermost/Info.plist index 965bf8a7d..12a29c7ea 100644 --- a/ios/Mattermost/Info.plist +++ b/ios/Mattermost/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.7.0 + 1.7.1 CFBundleSignature ???? CFBundleURLTypes @@ -34,7 +34,7 @@ CFBundleVersion - 91 + 92 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS @@ -54,6 +54,8 @@ + NSAppleMusicUsageDescription + Let Mattermost access your Media files NSBluetoothPeripheralUsageDescription Share post data accross devices with Mattermost NSCalendarsUsageDescription @@ -68,8 +70,6 @@ Upload Photos and Videos to your Mattermost instance or save them to your device NSSpeechRecognitionUsageDescription Send voice messages to your Mattermost instance - NSAppleMusicUsageDescription - Let Mattermost access your Media files UIAppFonts Entypo.ttf diff --git a/ios/MattermostShare/Info.plist b/ios/MattermostShare/Info.plist index fb798a102..0d7dda808 100644 --- a/ios/MattermostShare/Info.plist +++ b/ios/MattermostShare/Info.plist @@ -21,9 +21,9 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 1.7.0 + 1.7.1 CFBundleVersion - 91 + 92 NSAppTransportSecurity NSAllowsArbitraryLoads diff --git a/ios/MattermostTests/Info.plist b/ios/MattermostTests/Info.plist index 2a56a9fa6..adfd5d478 100644 --- a/ios/MattermostTests/Info.plist +++ b/ios/MattermostTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.7.0 + 1.7.1 CFBundleSignature ???? CFBundleVersion - 91 + 92 diff --git a/share_extension/ios/index.js b/share_extension/ios/index.js index 605d47e99..46d147f5a 100644 --- a/share_extension/ios/index.js +++ b/share_extension/ios/index.js @@ -73,8 +73,12 @@ export default class SharedApp extends PureComponent { }; userIsLoggedIn = () => { - return Boolean(this.entities && this.entities.general && this.entities.general.credentials && - this.entities.general.credentials.token && this.entities.general.credentials.url); + if (this.entities && this.entities.general && this.entities.general.credentials && + this.entities.general.credentials.token && this.entities.general.credentials.url) { + return true; + } + + return false; }; render() {