fweinaug / system_settings

Flutter plugin to open system settings on iOS and Android
https://pub.dev/packages/system_settings
MIT License
11 stars 66 forks source link

Plugin throwing build error with latest iOS 14 / XCode update #2

Closed ouija closed 3 years ago

ouija commented 3 years ago

Hi,

Getting a build error when trying to compile my flutter application w/latest version of Xcode release:

Xcode's output:
↳
/Users/user/Development/flutter/.pub-cache/hosted/pub.dartlang.org/system_setting-0.1.3/ios/Classes/SwiftSystemSettingPlugin.swift:17:65: error: cannot convert value of type '[UIApplication.OpenExternalURLOptionsKey : Any]' (aka 'Dictionary<NSString, Any>') to expected argument type '[String : Any]'
                        UIApplication.shared.open(url, options: convertToUIApplicationOpenExternalURLOptionsKeyDictionary([:]), completionHandler: nil)
                                                                ^
/Users/user/Development/flutter/.pub-cache/hosted/pub.dartlang.org/system_setting-0.1.3/ios/Classes/SwiftSystemSettingPlugin.swift:17:65: note: arguments to generic parameter 'Key' ('UIApplication.OpenExternalURLOptionsKey' (aka 'NSString') and 'String') are expected to be equal
                        UIApplication.shared.open(url, options: convertToUIApplicationOpenExternalURLOptionsKeyDictionary([:]), completionHandler: nil)
                                                                ^
/Users/user/Development/flutter/.pub-cache/hosted/pub.dartlang.org/system_setting-0.1.3/ios/Classes/SwiftSystemSettingPlugin.swift:30:108: error: incorrect argument label in call (have 'rawValue:', expected 'string:')
        return Dictionary(uniqueKeysWithValues: input.map { key, value in (UIApplication.OpenExternalURLOptionsKey(rawValue: key), value)})
                                                                                                                  ^~~~~~~~~
                                                                                                                   string
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Any solution to this? Thank you!

ouija commented 3 years ago

Sorry, wrong plugin -- meant for 'system_setting' flutter plugin, my bad.