Selaa lähdekoodia

fix(ios): update wry, fix plugin config load (#6810)

Lucas Fernandes Nogueira 2 vuotta sitten
vanhempi
sitoutus
41cb06172a

+ 1 - 1
core/tauri-runtime-wry/Cargo.toml

@@ -13,7 +13,7 @@ exclude = [ "CHANGELOG.md", "/target" ]
 readme = "README.md"
 
 [dependencies]
-wry = { version = "0.28.2", default-features = false, features = [ "file-drop", "protocol" ] }
+wry = { version = "0.28.3", default-features = false, features = [ "file-drop", "protocol" ] }
 tauri-runtime = { version = "0.13.0-alpha.4", path = "../tauri-runtime" }
 tauri-utils = { version = "2.0.0-alpha.4", path = "../tauri-utils" }
 uuid = { version = "1", features = [ "v4" ] }

+ 2 - 2
core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift

@@ -93,11 +93,11 @@ extension PluginManager: NSCopying {
 }
 
 @_cdecl("register_plugin")
-func registerPlugin(name: SRString, plugin: NSObject, config: NSDictionary, webview: WKWebView?) {
+func registerPlugin(name: SRString, plugin: NSObject, config: NSDictionary?, webview: WKWebView?) {
 	PluginManager.shared.load(
 		name: name.toString(),
 		plugin: plugin as! Plugin,
-    config: JSTypes.coerceDictionaryToJSObject(config, formattingDatesAsStrings: true)!,
+    config: JSTypes.coerceDictionaryToJSObject(config ?? [:], formattingDatesAsStrings: true)!,
     webview: webview
 	)
 }

+ 2 - 2
examples/api/src-tauri/Cargo.lock

@@ -4001,9 +4001,9 @@ dependencies = [
 
 [[package]]
 name = "wry"
-version = "0.28.2"
+version = "0.28.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77dbd1fe0556bf87517db301c9be2bdc18f6311c0826c73b2c80a7f79ac0e31f"
+checksum = "7d15f9f827d537cefe6d047be3930f5d89b238dfb85e08ba6a319153217635aa"
 dependencies = [
  "base64 0.13.1",
  "block",