Skip to content

Commit 59eaf29

Browse files
authored
bug: data wasnt using deepswift (#64)
1 parent fd64fc5 commit 59eaf29

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Sources/SkipFirebaseFunctions/SkipFirebaseFunctions.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,8 @@ public class HTTPSCallableResult: KotlinConverting<com.google.firebase.functions
8888
}
8989

9090
public var data: Any {
91-
// WORKAROUND: Access getData() result through a local variable first
92-
// to avoid potential crashes in Skip's property access transpilation
93-
let rawData: Any? = platformValue.getData()
94-
return rawData ?? [String: Any]()
95-
}
96-
97-
// Alternative method-based access that properly converts Kotlin types to Swift
98-
public func getDataSafe() -> Any {
91+
// Convert Kotlin/Java types (HashMap, ArrayList) to Swift types (Dictionary, Array)
92+
// This prevents JNI crashes when Skip's bridge tries to call .kotlin() on raw Java types
9993
guard let rawData = platformValue.getData() else {
10094
return [String: Any]()
10195
}

0 commit comments

Comments
 (0)