compose-webview-multiplatform icon indicating copy to clipboard operation
compose-webview-multiplatform copied to clipboard

iOS error with latest navigation-compose

Open mjdenham opened this issue 1 year ago • 11 comments

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

mjdenham avatar Jul 12 '24 17:07 mjdenham

@mjdenham What's your CMP version?

KevinnZou avatar Jul 22 '24 14:07 KevinnZou

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

mjdenham avatar Jul 22 '24 18:07 mjdenham

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.

yuroyami avatar Jul 26 '24 22:07 yuroyami

我这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)

Matcha-xiaobin avatar Aug 01 '24 06:08 Matcha-xiaobin

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

pavelrukin avatar Aug 01 '24 15:08 pavelrukin

@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.

yuroyami avatar Aug 01 '24 20:08 yuroyami

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

KotlyDev avatar Aug 02 '24 09:08 KotlyDev

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.

KevinnZou avatar Aug 04 '24 01:08 KevinnZou

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

Egi10 avatar Aug 04 '24 04:08 Egi10

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.

KevinnZou avatar Aug 04 '24 13:08 KevinnZou

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

maicol07 avatar Aug 04 '24 13:08 maicol07

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.

OSemenovBoyarka avatar Aug 27 '24 06:08 OSemenovBoyarka

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

Psycadelik avatar Aug 29 '24 04:08 Psycadelik

@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.

fluxxion82 avatar Sep 04 '24 00:09 fluxxion82

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

KevinnZou avatar Sep 06 '24 00:09 KevinnZou

Thanks Kevinn, 1.9.40-alpha01 works great.

mjdenham avatar Sep 11 '24 15:09 mjdenham