George Karpenko
02/12/2025, 11:21 AMjs
library from shared kotlin common module for android and iOS targets.
As far as i understood i dont need whole Zipline
for this, it is enough to have QuickJs
imports.
What i'm trying to play with is:
private const val libPath = "libs/my_lib.js"
private const val script = "foo(10.1234, 2, false);"
fun testFooJsLib(): String {
val quickJs = QuickJs.create()
val result = quickJs.evaluate(script = script, fileName = libPath)
return result.toString()
}
But i'm getting app.cash.zipline.QuickJsException: 'foo' is not defined
- so where i need to place my my_lib.js
file to be able to call functions from it?
Thx beforehand!
because i haven't found any similiar case in web or herejessewilson
02/12/2025, 1:14 PMjessewilson
02/12/2025, 1:15 PMjessewilson
02/12/2025, 1:15 PM