Commit 0ea46a6b by Martijn van Dijk Committed by GitHub

Merge pull request #50 from BaseflowIT/issues/49

Fix build error on latest Xcode (iOS 12)
parents 993641f2 9b7f4c4e
...@@ -60,6 +60,7 @@ post_install do |installer| ...@@ -60,6 +60,7 @@ post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
target.build_configurations.each do |config| target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['SWIFT_VERSION'] = '4.2'
end end
end end
end end
...@@ -367,6 +367,7 @@ ...@@ -367,6 +367,7 @@
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
name = Debug; name = Debug;
...@@ -417,6 +418,7 @@ ...@@ -417,6 +418,7 @@
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
}; };
......
...@@ -47,10 +47,14 @@ class PermissionManager: NSObject { ...@@ -47,10 +47,14 @@ class PermissionManager: NSObject {
static func openAppSettings(result: @escaping FlutterResult) { static func openAppSettings(result: @escaping FlutterResult) {
if #available(iOS 8.0, *) { if #available(iOS 8.0, *) {
if #available(iOS 10, *) { if #available(iOS 10, *) {
UIApplication.shared.open(URL.init(string: UIApplication.openSettingsURLString)!, options: convertToUIApplicationOpenExternalURLOptionsKeyDictionary([:]), guard let url = URL(string: UIApplication.openSettingsURLString),
completionHandler: { UIApplication.shared.canOpenURL(url) else {
(success) in result(success) return
}) }
let optionsKeyDictionary = [UIApplication.OpenExternalURLOptionsKey(rawValue: "universalLinksOnly"): NSNumber(value: true)]
UIApplication.shared.open(url, options: optionsKeyDictionary, completionHandler: nil)
} else { } else {
let success = UIApplication.shared.openURL(URL.init(string: UIApplication.openSettingsURLString)!) let success = UIApplication.shared.openURL(URL.init(string: UIApplication.openSettingsURLString)!)
result(success) result(success)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment