KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
427 stars 54 forks source link

iOS error with latest navigation-compose #196

Open mjdenham opened 1 month ago

mjdenham commented 1 month ago

If I upgrade the navigation-compose library to version 2.8.0-alpha08 in order to use the new type-safe navigation objects the webview still works on Android but there is an error from WebViewNavigator when running iOS:

IrLinkageError: Function 'UIKitView' can not be called: No function found for symbol 'androidx.compose.ui.interop/UIKitView

I have attached a stacktrace. iosKmpWebviewCrash.txt

The small test project I am working on is here: https://github.com/mjdenham/KMP-Compose-Bible-App

KevinnZou commented 1 month ago

@mjdenham What's your CMP version?

mjdenham commented 1 month ago

I am using the latest stable which is 1.6.10. I tried updating the compose version to 1.7.0-alpha01 but got the same error. Do you think the compose version could cause the error in: com.multiplatform.webview.web#IOSWebView

yuroyami commented 1 month ago

This is probably a binary compatibility issue. The library source code works fine when I merge it with my own code, but when I add it as a library it doesn't.

Matcha-xiaobin commented 1 month ago

我这ios端也有相同的问题。 安卓端可正常使用。 mac os端有以下错误: JCEF_W(36:44:100): failed to retrieve platform window handle Exception in thread "AppKit Thread" java.lang.ClassNotFoundException: org.cef.CefBrowserSettings at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

pavelrukin commented 1 month ago

I also have the same problem. Please tell me did you manage to solve it. kotlin.native.internal.IrLinkageError: Function 'UIKitView' can not be called: No function found for symbol 'androidx.compose.ui.interop/UIKitView|UIKitView

yuroyami commented 1 month ago

@pavelrukin The workaround you can go for as of now, is to copy the source code files into your codebase rather than using this as an external dependency.

NaiRo94s commented 1 month ago

I receive the same error using the latest compose multiplatform version. 1.7.0-alpha02

KevinnZou commented 1 month ago

It seems that we need to update the CMP version to 1.7.0-alpha01 to make it compatible with the latest navigation-compose library. However, we will not upgrade until the stable version is released.

Egi10 commented 1 month ago

I'm getting the same error on my iOS device with CMP 1.6.11

KevinnZou commented 1 month ago

I'm getting the same error on my iOS device with CMP 1.6.11

2.8.0-alpha08 only works with CMP 1.7.0-*. I would recommend you downgrade to the stable version first.

maicol07 commented 1 month ago

@KevinnZou can you publish an alpha/beta version that supports the new compose? So in the meantime, we can use it

OSemenovBoyarka commented 1 week ago

I have the same issue with Kottie library - https://github.com/ismai117/kottie. Copying problematic file from the library into the project solves the issue.

Psycadelik commented 1 week ago

I also have the same issue on ios but the webview works just fine on Android:

Uncaught Kotlin exception: kotlin.native.internal.IrLinkageError: Function 'UIKitView' can not be called: No function found for symbol 'androidx.compose.ui.interop/UIKitView

CMP version - 1.6.10 navigation-compose - 2.8.0-alpha08 kotlin - 2.0.0

fluxxion82 commented 5 days ago

@KevinnZou Having an alpha/beta version that uses the latest CMP and navigation libraries would be a good idea and help a lot of people. Copying files into our project isn't a good workaround.

KevinnZou commented 3 days ago

@fluxxion82 Thanks for your feedback! I will release an alpha version next week. Sorry for the inconvenience.