Fix a couple of iOS warnings

This commit is contained in:
Michal Srutek 2023-12-20 11:07:07 +01:00
parent 73c27928ca
commit b954080321
5 changed files with 5 additions and 5 deletions

View File

@ -145,7 +145,7 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega
}
}
if let wId = windowId {
if windowId != nil {
channelDelegate?.onBrowserCreated()
webView?.runWindowBeforeCreatedCallbacks()
} else {

View File

@ -138,7 +138,7 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView, Disposable
}
load(initialUrlRequest: initialUrlRequest, initialFile: initialFile, initialData: initialData)
}
else if let wId = windowId {
else if windowId != nil {
webView.runWindowBeforeCreatedCallbacks()
}
}

View File

@ -39,7 +39,7 @@ public class WebMessageChannelChannelDelegate : ChannelDelegate {
if let webView = webMessageChannel?.webView, let ports = webMessageChannel?.ports, ports.count > 0 {
let index = arguments!["index"] as! Int
let port = ports[index]
var message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
let message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
var ports: [WebMessagePort] = []
if let notConnectedPorts = message.ports {

View File

@ -509,7 +509,7 @@ public class WebViewChannelDelegate : ChannelDelegate {
break
case .postWebMessage:
if let webView = webView {
var message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
let message = WebMessage.fromMap(map: arguments!["message"] as! [String: Any?])
let targetOrigin = arguments!["targetOrigin"] as! String
var ports: [WebMessagePort] = []

View File

@ -148,7 +148,7 @@ public class PrintJobSettings: ISettings<PrintJobController> {
}
override func getRealSettings(obj: PrintJobController?) -> [String: Any?] {
var realOptions: [String: Any?] = toMap()
let realOptions: [String: Any?] = toMap()
return realOptions
}
}