Skip to content

Commit

Permalink
fix(core): Swift warning for null invoke.resolve() iOS plugin values (#…
Browse files Browse the repository at this point in the history
…10842)

`Any` does allow `nil`,  but must be explicitly set to avoid the Swift warning
  • Loading branch information
lucasfernog authored Sep 2, 2024
1 parent c55474f commit 6696e48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/ios-invoke-response-null.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---

Fixes a warning when using a null value on the `invoke.resolve()` iOS plugin API.
2 changes: 1 addition & 1 deletion crates/tauri/mobile/ios-api/Sources/Tauri/JsonValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import Foundation

public typealias JsonObject = [String: Any]
public typealias JsonObject = [String: Any?]

public enum JsonValue {
case dictionary(JsonObject)
Expand Down

0 comments on commit 6696e48

Please sign in to comment.