Commit 42fdd90c by Maurits van Beusekom

Release 2.1.2

parents e07ce94b 1805d290
## 2.1.2
* Make sure the Permission Handler compiles with latest iOS SDK
## 2.1.1 ## 2.1.1
* Update to the latest version of Swift (4.2); * Update to the latest version of Swift (4.2);
......
...@@ -22,7 +22,7 @@ To use this plugin, add `permission_handler` as a [dependency in your pubspec.ya ...@@ -22,7 +22,7 @@ To use this plugin, add `permission_handler` as a [dependency in your pubspec.ya
```yaml ```yaml
dependencies: dependencies:
permission_handler: '^2.1.1' permission_handler: '^2.1.2'
``` ```
> **NOTE:** There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. See issue [Flutter#16049](https://github.com/flutter/flutter/issues/16049) for help on integration. > **NOTE:** There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. See issue [Flutter#16049](https://github.com/flutter/flutter/issues/16049) for help on integration.
......
...@@ -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)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'permission_handler' s.name = 'permission_handler'
s.version = '2.1.1' s.version = '2.1.2'
s.summary = 'Permission plugin for Flutter.' s.summary = 'Permission plugin for Flutter.'
s.description = <<-DESC s.description = <<-DESC
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
......
name: permission_handler name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 2.1.1 version: 2.1.2
author: Baseflow <hello@baseflow.com> author: Baseflow <hello@baseflow.com>
homepage: https://github.com/baseflowit/flutter-permission-handler homepage: https://github.com/baseflowit/flutter-permission-handler
......
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