From 808d790d8f6185d6c2c25eb416f48ee0e6f778ad Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 13 Jul 2023 19:21:17 -0400 Subject: [PATCH] [various] Update Pigeon in Swift plugins (#4461) Updates `pigeon` in all of our Swift plugins, to ensure that they have the fix for https://github.com/flutter/flutter/issues/129283 Fixes https://github.com/flutter/flutter/issues/129536 --- .../file_selector_macos/CHANGELOG.md | 4 ++ .../lib/src/messages.g.dart | 2 +- .../macos/Classes/messages.g.swift | 24 +++++----- .../file_selector_macos/pubspec.yaml | 4 +- .../test/messages_test.g.dart | 2 +- .../path_provider_foundation/CHANGELOG.md | 3 +- .../darwin/Classes/messages.g.swift | 25 +++++----- .../lib/messages.g.dart | 2 +- .../path_provider_foundation/pubspec.yaml | 4 +- .../test/messages_test.g.dart | 2 +- .../CHANGELOG.md | 4 ++ .../darwin/Classes/messages.g.swift | 47 +++++++++++-------- .../lib/messages.g.dart | 2 +- .../pubspec.yaml | 4 +- .../test/test_api.g.dart | 2 +- .../url_launcher_macos/CHANGELOG.md | 3 +- .../lib/src/messages.g.dart | 2 +- .../macos/Classes/messages.g.swift | 12 ++--- .../url_launcher_macos/pubspec.yaml | 4 +- 19 files changed, 86 insertions(+), 66 deletions(-) diff --git a/packages/file_selector/file_selector_macos/CHANGELOG.md b/packages/file_selector/file_selector_macos/CHANGELOG.md index 7a197838bb95..a80935d5f76d 100644 --- a/packages/file_selector/file_selector_macos/CHANGELOG.md +++ b/packages/file_selector/file_selector_macos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.3+1 + +* Updates to the latest version of `pigeon`. + ## 0.9.3 * Adds `getSaveLocation` and deprecates `getSavePath`. diff --git a/packages/file_selector/file_selector_macos/lib/src/messages.g.dart b/packages/file_selector/file_selector_macos/lib/src/messages.g.dart index e8d5a85147a4..cbf8dd10007a 100644 --- a/packages/file_selector/file_selector_macos/lib/src/messages.g.dart +++ b/packages/file_selector/file_selector_macos/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import diff --git a/packages/file_selector/file_selector_macos/macos/Classes/messages.g.swift b/packages/file_selector/file_selector_macos/macos/Classes/messages.g.swift index 67007e100811..7cff0d721df8 100644 --- a/packages/file_selector/file_selector_macos/macos/Classes/messages.g.swift +++ b/packages/file_selector/file_selector_macos/macos/Classes/messages.g.swift @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation @@ -35,7 +35,7 @@ private func wrapError(_ error: Any) -> [Any?] { private func nilOrValue(_ value: Any?) -> T? { if value is NSNull { return nil } - return (value as Any) as! T? + return value as! T? } /// A Pigeon representation of the macOS portion of an `XTypeGroup`. @@ -46,7 +46,7 @@ struct AllowedTypes { var mimeTypes: [String?] var utis: [String?] - static func fromList(_ list: [Any]) -> AllowedTypes? { + static func fromList(_ list: [Any?]) -> AllowedTypes? { let extensions = list[0] as! [String?] let mimeTypes = list[1] as! [String?] let utis = list[2] as! [String?] @@ -78,9 +78,9 @@ struct SavePanelOptions { var nameFieldStringValue: String? = nil var prompt: String? = nil - static func fromList(_ list: [Any]) -> SavePanelOptions? { + static func fromList(_ list: [Any?]) -> SavePanelOptions? { var allowedFileTypes: AllowedTypes? = nil - if let allowedFileTypesList = list[0] as! [Any]? { + if let allowedFileTypesList: [Any?] = nilOrValue(list[0]) { allowedFileTypes = AllowedTypes.fromList(allowedFileTypesList) } let directoryPath: String? = nilOrValue(list[1]) @@ -115,11 +115,11 @@ struct OpenPanelOptions { var canChooseFiles: Bool var baseOptions: SavePanelOptions - static func fromList(_ list: [Any]) -> OpenPanelOptions? { + static func fromList(_ list: [Any?]) -> OpenPanelOptions? { let allowsMultipleSelection = list[0] as! Bool let canChooseDirectories = list[1] as! Bool let canChooseFiles = list[2] as! Bool - let baseOptions = SavePanelOptions.fromList(list[3] as! [Any])! + let baseOptions = SavePanelOptions.fromList(list[3] as! [Any?])! return OpenPanelOptions( allowsMultipleSelection: allowsMultipleSelection, @@ -142,11 +142,11 @@ private class FileSelectorApiCodecReader: FlutterStandardReader { override func readValue(ofType type: UInt8) -> Any? { switch type { case 128: - return AllowedTypes.fromList(self.readValue() as! [Any]) + return AllowedTypes.fromList(self.readValue() as! [Any?]) case 129: - return OpenPanelOptions.fromList(self.readValue() as! [Any]) + return OpenPanelOptions.fromList(self.readValue() as! [Any?]) case 130: - return SavePanelOptions.fromList(self.readValue() as! [Any]) + return SavePanelOptions.fromList(self.readValue() as! [Any?]) default: return super.readValue(ofType: type) } @@ -214,7 +214,7 @@ class FileSelectorApiSetup { codec: codec) if let api = api { displayOpenPanelChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let optionsArg = args[0] as! OpenPanelOptions api.displayOpenPanel(options: optionsArg) { result in switch result { @@ -236,7 +236,7 @@ class FileSelectorApiSetup { codec: codec) if let api = api { displaySavePanelChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let optionsArg = args[0] as! SavePanelOptions api.displaySavePanel(options: optionsArg) { result in switch result { diff --git a/packages/file_selector/file_selector_macos/pubspec.yaml b/packages/file_selector/file_selector_macos/pubspec.yaml index 047c7caca4f3..3bbf2624b3e3 100644 --- a/packages/file_selector/file_selector_macos/pubspec.yaml +++ b/packages/file_selector/file_selector_macos/pubspec.yaml @@ -2,7 +2,7 @@ name: file_selector_macos description: macOS implementation of the file_selector plugin. repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_macos issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22 -version: 0.9.3 +version: 0.9.3+1 environment: sdk: ">=2.18.0 <4.0.0" @@ -27,4 +27,4 @@ dev_dependencies: flutter_test: sdk: flutter mockito: 5.4.1 - pigeon: ^9.2.4 + pigeon: ^10.1.3 diff --git a/packages/file_selector/file_selector_macos/test/messages_test.g.dart b/packages/file_selector/file_selector_macos/test/messages_test.g.dart index f72a987c83d6..893161f8e811 100644 --- a/packages/file_selector/file_selector_macos/test/messages_test.g.dart +++ b/packages/file_selector/file_selector_macos/test/messages_test.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import // ignore_for_file: avoid_relative_lib_imports diff --git a/packages/path_provider/path_provider_foundation/CHANGELOG.md b/packages/path_provider/path_provider_foundation/CHANGELOG.md index 51dbbfdabb50..1bbba4de2215 100644 --- a/packages/path_provider/path_provider_foundation/CHANGELOG.md +++ b/packages/path_provider/path_provider_foundation/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 2.2.4 +* Updates to the latest version of `pigeon`. * Updates minimum supported macOS version to 10.14. ## 2.2.3 diff --git a/packages/path_provider/path_provider_foundation/darwin/Classes/messages.g.swift b/packages/path_provider/path_provider_foundation/darwin/Classes/messages.g.swift index 7bfb25724f5b..402e14f2d32d 100644 --- a/packages/path_provider/path_provider_foundation/darwin/Classes/messages.g.swift +++ b/packages/path_provider/path_provider_foundation/darwin/Classes/messages.g.swift @@ -1,16 +1,17 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation + #if os(iOS) -import Flutter + import Flutter #elseif os(macOS) -import FlutterMacOS + import FlutterMacOS #else -#error("Unsupported platform.") + #error("Unsupported platform.") #endif private func wrapResult(_ result: Any?) -> [Any?] { @@ -22,19 +23,19 @@ private func wrapError(_ error: Any) -> [Any?] { return [ flutterError.code, flutterError.message, - flutterError.details + flutterError.details, ] } return [ "\(error)", "\(type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)" + "Stacktrace: \(Thread.callStackSymbols)", ] } private func nilOrValue(_ value: Any?) -> T? { if value is NSNull { return nil } - return (value as Any) as! T? + return value as! T? } enum DirectoryType: Int { @@ -55,10 +56,11 @@ class PathProviderApiSetup { /// The codec used by PathProviderApi. /// Sets up an instance of `PathProviderApi` to handle messages through the `binaryMessenger`. static func setUp(binaryMessenger: FlutterBinaryMessenger, api: PathProviderApi?) { - let getDirectoryPathChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.PathProviderApi.getDirectoryPath", binaryMessenger: binaryMessenger) + let getDirectoryPathChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.PathProviderApi.getDirectoryPath", binaryMessenger: binaryMessenger) if let api = api { getDirectoryPathChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let typeArg = DirectoryType(rawValue: args[0] as! Int)! do { let result = try api.getDirectoryPath(type: typeArg) @@ -70,10 +72,11 @@ class PathProviderApiSetup { } else { getDirectoryPathChannel.setMessageHandler(nil) } - let getContainerPathChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.PathProviderApi.getContainerPath", binaryMessenger: binaryMessenger) + let getContainerPathChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.PathProviderApi.getContainerPath", binaryMessenger: binaryMessenger) if let api = api { getContainerPathChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let appGroupIdentifierArg = args[0] as! String do { let result = try api.getContainerPath(appGroupIdentifier: appGroupIdentifierArg) diff --git a/packages/path_provider/path_provider_foundation/lib/messages.g.dart b/packages/path_provider/path_provider_foundation/lib/messages.g.dart index 7d8d87d849d3..7893dbd25e6c 100644 --- a/packages/path_provider/path_provider_foundation/lib/messages.g.dart +++ b/packages/path_provider/path_provider_foundation/lib/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import diff --git a/packages/path_provider/path_provider_foundation/pubspec.yaml b/packages/path_provider/path_provider_foundation/pubspec.yaml index a86646c9e824..936e182f263a 100644 --- a/packages/path_provider/path_provider_foundation/pubspec.yaml +++ b/packages/path_provider/path_provider_foundation/pubspec.yaml @@ -2,7 +2,7 @@ name: path_provider_foundation description: iOS and macOS implementation of the path_provider plugin repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_foundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.2.3 +version: 2.2.4 environment: sdk: ">=2.18.0 <4.0.0" @@ -32,4 +32,4 @@ dev_dependencies: sdk: flutter mockito: 5.4.1 path: ^1.8.0 - pigeon: ^9.2.4 + pigeon: ^10.1.3 diff --git a/packages/path_provider/path_provider_foundation/test/messages_test.g.dart b/packages/path_provider/path_provider_foundation/test/messages_test.g.dart index ed00e2a4858c..c1477dfe4157 100644 --- a/packages/path_provider/path_provider_foundation/test/messages_test.g.dart +++ b/packages/path_provider/path_provider_foundation/test/messages_test.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import // ignore_for_file: avoid_relative_lib_imports diff --git a/packages/shared_preferences/shared_preferences_foundation/CHANGELOG.md b/packages/shared_preferences/shared_preferences_foundation/CHANGELOG.md index 7bbf5322a081..17b024e41078 100644 --- a/packages/shared_preferences/shared_preferences_foundation/CHANGELOG.md +++ b/packages/shared_preferences/shared_preferences_foundation/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.2 + +* Updates to the latest version of `pigeon`. + ## 2.3.1 * Fixes variable binding bug on older versions of Xcode. diff --git a/packages/shared_preferences/shared_preferences_foundation/darwin/Classes/messages.g.swift b/packages/shared_preferences/shared_preferences_foundation/darwin/Classes/messages.g.swift index 723fbe263999..2e2616073c4c 100644 --- a/packages/shared_preferences/shared_preferences_foundation/darwin/Classes/messages.g.swift +++ b/packages/shared_preferences/shared_preferences_foundation/darwin/Classes/messages.g.swift @@ -1,16 +1,17 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.5), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation + #if os(iOS) -import Flutter + import Flutter #elseif os(macOS) -import FlutterMacOS + import FlutterMacOS #else -#error("Unsupported platform.") + #error("Unsupported platform.") #endif private func wrapResult(_ result: Any?) -> [Any?] { @@ -22,19 +23,19 @@ private func wrapError(_ error: Any) -> [Any?] { return [ flutterError.code, flutterError.message, - flutterError.details + flutterError.details, ] } return [ "\(error)", "\(type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)" + "Stacktrace: \(Thread.callStackSymbols)", ] } private func nilOrValue(_ value: Any?) -> T? { if value is NSNull { return nil } - return (value as Any) as! T? + return value as! T? } /// Generated protocol from Pigeon that represents a handler of messages from Flutter. protocol UserDefaultsApi { @@ -51,10 +52,11 @@ class UserDefaultsApiSetup { /// The codec used by UserDefaultsApi. /// Sets up an instance of `UserDefaultsApi` to handle messages through the `binaryMessenger`. static func setUp(binaryMessenger: FlutterBinaryMessenger, api: UserDefaultsApi?) { - let removeChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.remove", binaryMessenger: binaryMessenger) + let removeChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.UserDefaultsApi.remove", binaryMessenger: binaryMessenger) if let api = api { removeChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let keyArg = args[0] as! String do { try api.remove(key: keyArg) @@ -66,10 +68,11 @@ class UserDefaultsApiSetup { } else { removeChannel.setMessageHandler(nil) } - let setBoolChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.setBool", binaryMessenger: binaryMessenger) + let setBoolChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.UserDefaultsApi.setBool", binaryMessenger: binaryMessenger) if let api = api { setBoolChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let keyArg = args[0] as! String let valueArg = args[1] as! Bool do { @@ -82,10 +85,11 @@ class UserDefaultsApiSetup { } else { setBoolChannel.setMessageHandler(nil) } - let setDoubleChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.setDouble", binaryMessenger: binaryMessenger) + let setDoubleChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.UserDefaultsApi.setDouble", binaryMessenger: binaryMessenger) if let api = api { setDoubleChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let keyArg = args[0] as! String let valueArg = args[1] as! Double do { @@ -98,12 +102,13 @@ class UserDefaultsApiSetup { } else { setDoubleChannel.setMessageHandler(nil) } - let setValueChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.setValue", binaryMessenger: binaryMessenger) + let setValueChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.UserDefaultsApi.setValue", binaryMessenger: binaryMessenger) if let api = api { setValueChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let keyArg = args[0] as! String - let valueArg = args[1] + let valueArg = args[1]! do { try api.setValue(key: keyArg, value: valueArg) reply(wrapResult(nil)) @@ -114,10 +119,11 @@ class UserDefaultsApiSetup { } else { setValueChannel.setMessageHandler(nil) } - let getAllChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.getAll", binaryMessenger: binaryMessenger) + let getAllChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.UserDefaultsApi.getAll", binaryMessenger: binaryMessenger) if let api = api { getAllChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let prefixArg = args[0] as! String let allowListArg: [String]? = nilOrValue(args[1]) do { @@ -130,10 +136,11 @@ class UserDefaultsApiSetup { } else { getAllChannel.setMessageHandler(nil) } - let clearChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.UserDefaultsApi.clear", binaryMessenger: binaryMessenger) + let clearChannel = FlutterBasicMessageChannel( + name: "dev.flutter.pigeon.UserDefaultsApi.clear", binaryMessenger: binaryMessenger) if let api = api { clearChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let prefixArg = args[0] as! String let allowListArg: [String]? = nilOrValue(args[1]) do { diff --git a/packages/shared_preferences/shared_preferences_foundation/lib/messages.g.dart b/packages/shared_preferences/shared_preferences_foundation/lib/messages.g.dart index 9ef912414c77..70b23362bbff 100644 --- a/packages/shared_preferences/shared_preferences_foundation/lib/messages.g.dart +++ b/packages/shared_preferences/shared_preferences_foundation/lib/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.5), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import diff --git a/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml b/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml index 1fd7a8c66605..2962614d8f06 100644 --- a/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml +++ b/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml @@ -2,7 +2,7 @@ name: shared_preferences_foundation description: iOS and macOS implementation of the shared_preferences plugin. repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_foundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22 -version: 2.3.1 +version: 2.3.2 environment: sdk: ">=2.18.0 <4.0.0" @@ -29,4 +29,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^9.2.4 + pigeon: ^10.1.3 diff --git a/packages/shared_preferences/shared_preferences_foundation/test/test_api.g.dart b/packages/shared_preferences/shared_preferences_foundation/test/test_api.g.dart index 6dd35a9df1b0..7d7386f8e3ba 100644 --- a/packages/shared_preferences/shared_preferences_foundation/test/test_api.g.dart +++ b/packages/shared_preferences/shared_preferences_foundation/test/test_api.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.5), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import // ignore_for_file: avoid_relative_lib_imports diff --git a/packages/url_launcher/url_launcher_macos/CHANGELOG.md b/packages/url_launcher/url_launcher_macos/CHANGELOG.md index bddec952ff75..1eb9359b1663 100644 --- a/packages/url_launcher/url_launcher_macos/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_macos/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 3.0.6 +* Updates to the latest version of `pigeon`. * Updates minimum supported macOS version to 10.14. * Updates minimum supported SDK version to Flutter 3.3/Dart 2.18. diff --git a/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart b/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart index e9e527cc6f2c..c519b7d6bd19 100644 --- a/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart +++ b/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import diff --git a/packages/url_launcher/url_launcher_macos/macos/Classes/messages.g.swift b/packages/url_launcher/url_launcher_macos/macos/Classes/messages.g.swift index d9f2c6fea0a5..bada84a91ad8 100644 --- a/packages/url_launcher/url_launcher_macos/macos/Classes/messages.g.swift +++ b/packages/url_launcher/url_launcher_macos/macos/Classes/messages.g.swift @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v9.2.4), do not edit directly. +// Autogenerated from Pigeon (v10.1.3), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation @@ -35,7 +35,7 @@ private func wrapError(_ error: Any) -> [Any?] { private func nilOrValue(_ value: Any?) -> T? { if value is NSNull { return nil } - return (value as Any) as! T? + return value as! T? } /// Possible error conditions for [UrlLauncherApi] calls. @@ -51,7 +51,7 @@ struct UrlLauncherBoolResult { var value: Bool var error: UrlLauncherError? = nil - static func fromList(_ list: [Any]) -> UrlLauncherBoolResult? { + static func fromList(_ list: [Any?]) -> UrlLauncherBoolResult? { let value = list[0] as! Bool var error: UrlLauncherError? = nil let errorEnumVal: Int? = nilOrValue(list[1]) @@ -75,7 +75,7 @@ private class UrlLauncherApiCodecReader: FlutterStandardReader { override func readValue(ofType type: UInt8) -> Any? { switch type { case 128: - return UrlLauncherBoolResult.fromList(self.readValue() as! [Any]) + return UrlLauncherBoolResult.fromList(self.readValue() as! [Any?]) default: return super.readValue(ofType: type) } @@ -127,7 +127,7 @@ class UrlLauncherApiSetup { codec: codec) if let api = api { canLaunchUrlChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let urlArg = args[0] as! String do { let result = try api.canLaunch(url: urlArg) @@ -145,7 +145,7 @@ class UrlLauncherApiSetup { codec: codec) if let api = api { launchUrlChannel.setMessageHandler { message, reply in - let args = message as! [Any] + let args = message as! [Any?] let urlArg = args[0] as! String do { let result = try api.launch(url: urlArg) diff --git a/packages/url_launcher/url_launcher_macos/pubspec.yaml b/packages/url_launcher/url_launcher_macos/pubspec.yaml index 1c09ae7f43bf..951d09cf5559 100644 --- a/packages/url_launcher/url_launcher_macos/pubspec.yaml +++ b/packages/url_launcher/url_launcher_macos/pubspec.yaml @@ -2,7 +2,7 @@ name: url_launcher_macos description: macOS implementation of the url_launcher plugin. repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_macos issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22 -version: 3.0.5 +version: 3.0.6 environment: sdk: ">=2.18.0 <4.0.0" @@ -25,5 +25,5 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^9.2.4 + pigeon: ^10.1.3 test: ^1.16.3