From 558c90c8da9285220e841d3d4bdb5aa032832e8a Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Thu, 2 Sep 2021 09:01:04 -0400 Subject: [PATCH] Upgrade iOS minimum version to 12.1 and ESR to 5.37 (#5660) --- README.md | 2 +- app/constants/view.js | 6 +-- app/init/global_event_handler.test.js | 2 +- .../android/en-US/full_description.txt | 2 +- fastlane/metadata/changelog | 2 +- ios/Mattermost.xcodeproj/project.pbxproj | 39 ++++++++++++++----- .../xcschemes/Mattermost.xcscheme | 4 +- .../xcschemes/MattermostShare.xcscheme | 11 ++---- .../xcschemes/NotificationService.xcscheme | 11 ++---- ios/Mattermost/AppDelegate.m | 13 ++++--- ios/Mattermost/Mattermost+RCTUITextView.m | 2 + ios/Mattermost/MattermostManaged.m | 2 +- ios/Mattermost/UIImage+ImageEffects.m | 2 +- .../ChannelsViewController.swift | 4 +- ios/Podfile | 7 +++- ios/Podfile.lock | 2 +- .../project.pbxproj | 9 +++-- .../xcschemes/UploadAttachments.xcscheme | 6 +-- .../UploadAttachments/AttachmentArray.swift | 2 +- .../UploadSessionManager.swift | 2 +- 20 files changed, 76 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 08618a59a..dda484e56 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mattermost Mobile -- **Minimum Server versions:** Current ESR version (5.31.3) +- **Minimum Server versions:** Current ESR version (5.37.0) - **Supported iOS versions:** 11+ - **Supported Android versions:** 7.0+ diff --git a/app/constants/view.js b/app/constants/view.js index 1fe228cf5..85e877498 100644 --- a/app/constants/view.js +++ b/app/constants/view.js @@ -108,10 +108,10 @@ const ViewTypes = keyMirror({ }); const RequiredServer = { - FULL_VERSION: '5.31.3', + FULL_VERSION: '5.37.0', MAJOR_VERSION: 5, - MIN_VERSION: 31, - PATCH_VERSION: 3, + MIN_VERSION: 37, + PATCH_VERSION: 0, }; export default { diff --git a/app/init/global_event_handler.test.js b/app/init/global_event_handler.test.js index 746cdf993..9cf0d4c4c 100644 --- a/app/init/global_event_handler.test.js +++ b/app/init/global_event_handler.test.js @@ -143,7 +143,7 @@ describe('GlobalEventHandler', () => { jest.clearAllMocks(); }); - const minVersion = semver.parse('5.31.0'); + const minVersion = semver.parse('5.37.0'); const currentUserId = 'current-user-id'; Store.redux.getState = jest.fn().mockReturnValue({ entities: { diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index a6d0aa5d6..d35ad63d8 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -1,4 +1,4 @@ -Requires Mattermost Server v5.31+. Older servers may not be able to connect or have unexpected behavior. +Requires Mattermost Server v5.37+. Older servers may not be able to connect or have unexpected behavior. ------- diff --git a/fastlane/metadata/changelog b/fastlane/metadata/changelog index 6c7522f72..1680d5f9c 100644 --- a/fastlane/metadata/changelog +++ b/fastlane/metadata/changelog @@ -1,4 +1,4 @@ -This version is compatible with Mattermost servers v5.31.3+. +This version is compatible with Mattermost servers v5.37.0+. Please see [changelog](https://docs.mattermost.com/administration/mobile-changelog.html) for full release notes. If you're interested in helping beta test upcoming versions before they are released, please see our [documentation](https://github.com/mattermost/mattermost-mobile#testing). diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index b41e6b571..e8c83f119 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -567,7 +567,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1010; - LastUpgradeCheck = 820; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = Facebook; TargetAttributes = { 13B07F861A680F5B00A75B9A = { @@ -917,7 +917,7 @@ "$(SRCROOT)/UploadAttachments/UploadAttachments", ); INFOPLIST_FILE = Mattermost/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_CFLAGS = ( "$(inherited)", @@ -959,7 +959,7 @@ "$(SRCROOT)/UploadAttachments/UploadAttachments", ); INFOPLIST_FILE = Mattermost/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_CFLAGS = ( "$(inherited)", @@ -1007,7 +1007,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; HEADER_SEARCH_PATHS = "$(SRCROOT)/UploadAttachments/UploadAttachments"; INFOPLIST_FILE = MattermostShare/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -1053,7 +1053,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; HEADER_SEARCH_PATHS = "$(SRCROOT)/UploadAttachments/UploadAttachments"; INFOPLIST_FILE = MattermostShare/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_FAST_MATH = YES; OTHER_CFLAGS = ( @@ -1095,7 +1095,7 @@ DEVELOPMENT_TEAM = UQ8HT4Q2XM; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NotificationService/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -1139,7 +1139,7 @@ DEVELOPMENT_TEAM = UQ8HT4Q2XM; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NotificationService/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_FAST_MATH = YES; OTHER_CFLAGS = ( @@ -1159,18 +1159,28 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1194,7 +1204,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1205,18 +1215,28 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1234,9 +1254,10 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme b/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme index 341055bac..da4c7c01f 100644 --- a/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme +++ b/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme @@ -1,6 +1,6 @@ diff --git a/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/MattermostShare.xcscheme b/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/MattermostShare.xcscheme index 1c01c530e..62bcd6018 100644 --- a/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/MattermostShare.xcscheme +++ b/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/MattermostShare.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - - - - - + + - - #import +@interface AppDelegate () +@end + @implementation AppDelegate NSString* const NOTIFICATION_MESSAGE_ACTION = @"message"; @@ -54,7 +57,8 @@ NSString* const NOTIFICATION_UPDATE_BADGE_ACTION = @"update_badge"; [[NSUserDefaults standardUserDefaults] synchronize]; } - [ReactNativeNavigation bootstrapWithDelegate:self launchOptions:launchOptions]; + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + [ReactNativeNavigation bootstrapWithBridge:bridge]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil]; @@ -121,10 +125,9 @@ NSString* const NOTIFICATION_UPDATE_BADGE_ACTION = @"update_badge"; // Required for deeplinking - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication annotation:(id)annotation + options:(NSDictionary *)options { - return [RCTLinkingManager application:application openURL:url - sourceApplication:sourceApplication annotation:annotation]; + return [RCTLinkingManager application:application openURL:url options:options]; } // Only if your app is using [Universal Links](https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html). @@ -155,11 +158,9 @@ RNHWKeyboardEvent *hwKeyEvent = nil; } - (void)sendEnter:(UIKeyCommand *)sender { - NSString *selected = sender.input; [hwKeyEvent sendHWKeyEvent:@"enter"]; } - (void)sendShiftEnter:(UIKeyCommand *)sender { - NSString *selected = sender.input; [hwKeyEvent sendHWKeyEvent:@"shift-enter"]; } @end diff --git a/ios/Mattermost/Mattermost+RCTUITextView.m b/ios/Mattermost/Mattermost+RCTUITextView.m index dddf20b89..ce692bd7e 100644 --- a/ios/Mattermost/Mattermost+RCTUITextView.m +++ b/ios/Mattermost/Mattermost+RCTUITextView.m @@ -18,6 +18,8 @@ @implementation RCTUITextView (DisableCopyPaste) +#pragma GCC diagnostic ignored "-Wundeclared-selector" + - (BOOL)canPerformAction:(SEL)action withSender:(id)sender { NSDictionary *response = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"com.apple.configuration.managed"]; diff --git a/ios/Mattermost/MattermostManaged.m b/ios/Mattermost/MattermostManaged.m index 263365a92..3d3767710 100644 --- a/ios/Mattermost/MattermostManaged.m +++ b/ios/Mattermost/MattermostManaged.m @@ -182,7 +182,7 @@ RCT_EXPORT_METHOD(supportsFaceId:(RCTPromiseResolveBlock)resolve [context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&error]; resolve(@{ - @"supportsFaceId": @(context.biometryType == LABiometryTypeFaceID && @available(iOS 11.0, *)) + @"supportsFaceId": @(context.biometryType == LABiometryTypeFaceID) }); } diff --git a/ios/Mattermost/UIImage+ImageEffects.m b/ios/Mattermost/UIImage+ImageEffects.m index 4d19e3a42..950ed337e 100644 --- a/ios/Mattermost/UIImage+ImageEffects.m +++ b/ios/Mattermost/UIImage+ImageEffects.m @@ -127,7 +127,7 @@ { const CGFloat EffectColorAlpha = 0.6; UIColor *effectColor = tintColor; - int componentCount = CGColorGetNumberOfComponents(tintColor.CGColor); + size_t componentCount = CGColorGetNumberOfComponents(tintColor.CGColor); if (componentCount == 2) { CGFloat b; if ([tintColor getWhite:&b alpha:NULL]) { diff --git a/ios/MattermostShare/ChannelsViewController.swift b/ios/MattermostShare/ChannelsViewController.swift index c5168c896..d818bb57b 100644 --- a/ios/MattermostShare/ChannelsViewController.swift +++ b/ios/MattermostShare/ChannelsViewController.swift @@ -45,8 +45,8 @@ class ChannelsViewController: UIViewController { func configureSearchBar() { searchController.searchResultsUpdater = self - searchController.hidesNavigationBarDuringPresentation = true - searchController.dimsBackgroundDuringPresentation = false + searchController.hidesNavigationBarDuringPresentation = false + searchController.obscuresBackgroundDuringPresentation = false searchController.searchBar.searchBarStyle = .minimal searchController.searchBar.autocapitalizationType = .none searchController.searchBar.delegate = self diff --git a/ios/Podfile b/ios/Podfile index 2fac8bf66..545274353 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,7 +1,7 @@ require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' -platform :ios, '11.0' +platform :ios, '12.1' target 'Mattermost' do # Pods for Mattermost @@ -33,5 +33,10 @@ target 'Mattermost' do react_native_post_install(installer) puts 'Patching XCDYouTube so it can playback videos' %x(patch Pods/XCDYouTubeKit/XCDYouTubeKit/XCDYouTubeVideoOperation.m < patches/XCDYouTubeVideoOperation.patch) + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' + end + end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ecb10c520..ee3d01650 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -782,6 +782,6 @@ SPEC CHECKSUMS: Yoga: 575c581c63e0d35c9a83f4b46d01d63abc1100ac YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008 -PODFILE CHECKSUM: d4ec78ededdb9c6523425879185c23a32b4efd90 +PODFILE CHECKSUM: 6628f9833955394b3861a436b13b3defc07d0a02 COCOAPODS: 1.10.1 diff --git a/ios/UploadAttachments/UploadAttachments.xcodeproj/project.pbxproj b/ios/UploadAttachments/UploadAttachments.xcodeproj/project.pbxproj index 9d925610e..1701b168b 100644 --- a/ios/UploadAttachments/UploadAttachments.xcodeproj/project.pbxproj +++ b/ios/UploadAttachments/UploadAttachments.xcodeproj/project.pbxproj @@ -5,6 +5,7 @@ }; objectVersion = 50; objects = { + /* Begin PBXBuildFile section */ 7F80232C229C91AD0034D6D4 /* MMMConstants.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7FABE054221387B500D0F595 /* MMMConstants.h */; }; 7F82907122C295AC0035544F /* MMKeychainManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F82907022C295AC0035544F /* MMKeychainManager.m */; }; @@ -141,7 +142,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1010; - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = Mattermost; TargetAttributes = { 7FABE03522137F2900D0F595 = { @@ -234,6 +235,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -259,7 +261,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -295,6 +297,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -314,7 +317,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; diff --git a/ios/UploadAttachments/UploadAttachments.xcodeproj/xcshareddata/xcschemes/UploadAttachments.xcscheme b/ios/UploadAttachments/UploadAttachments.xcodeproj/xcshareddata/xcschemes/UploadAttachments.xcscheme index 8dd4cbe61..d931ef445 100644 --- a/ios/UploadAttachments/UploadAttachments.xcodeproj/xcshareddata/xcschemes/UploadAttachments.xcscheme +++ b/ios/UploadAttachments/UploadAttachments.xcodeproj/xcshareddata/xcschemes/UploadAttachments.xcscheme @@ -1,6 +1,6 @@ - - - - (_ transform: (Element) -> ElementOfResult?) -> [ElementOfResult] { var result = [ElementOfResult]() - queue.sync { result = self.array.flatMap(transform) } + queue.sync { result = self.array.compactMap(transform) } return result } diff --git a/ios/UploadAttachments/UploadAttachments/UploadSessionManager.swift b/ios/UploadAttachments/UploadAttachments/UploadSessionManager.swift index e28533a82..877efb04b 100644 --- a/ios/UploadAttachments/UploadAttachments/UploadSessionManager.swift +++ b/ios/UploadAttachments/UploadAttachments/UploadSessionManager.swift @@ -8,7 +8,7 @@ import Foundation } @objc @objcMembers public class UploadSessionManager: NSObject { - private let bucket = MattermostBucket().bucket(byName: Bundle.main.infoDictionary!["AppGroupIdentifier"] as! String) + private let bucket = MattermostBucket().bucket(byName: Bundle.main.infoDictionary!["AppGroupIdentifier"] as? String) public class var shared :UploadSessionManager { struct Singleton {