onseok / peekaboo

🌄 Kotlin Multiplatform library for Compose Multiplatform, designed for seamless integration of an image picker feature in iOS and Android applications.
Apache License 2.0
249 stars 21 forks source link

IrLinkageError for UIKitView after upgrading app to compose 1.7.0 #108

Open shtolik opened 1 week ago

shtolik commented 1 week ago

I've upgraded my app using you library to jetpack compose 1.7.0 but now i get this error when trying to start camera.

I think it's because of different versions of compose in use. They've change UIKitView implementation and deprecated old. And I guess that leads to the error.


Uncaught Kotlin exception: kotlin.native.internal.IrLinkageError: Function 'UIKitView' can not be called: No function found for symbol 'androidx.compose.ui.interop/UIKitView|UIKitView(kotlin.Function0<0:0>;androidx.compose.ui.Modifier;kotlin.Function1<0:0,kotlin.Unit>?;androidx.compose.ui.graphics.Color;kotlin.Function1<0:0,kotlin.Unit>?;kotlin.Function2<0:0,kotlinx.cinterop.CValue<platform.CoreGraphics.CGRect>,kotlin.Unit>?;kotlin.Boolean;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){0§<platform.UIKit.UIView>}[0]'
    at 0   composeui                           0x10e11289b        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119 
    at 1   composeui                           0x10e10b9b3        kfun:kotlin.Error#<init>(kotlin.String?){} + 115 
    at 2   composeui                           0x10e14a757        kfun:kotlin.native.internal.IrLinkageError#<init>(kotlin.String?){} + 115 
    at 3   composeui                           0x10e14a81b        kfun:kotlin.native.internal#ThrowIrLinkageError(kotlin.String?){}kotlin.Nothing + 175 
    at 4   composeui                           0x10fee8be7        kfun:com.preat.peekaboo.ui.camera.RealDeviceCamera#internal.2 + 6183 
    at 5   composeui                           0x10fee6ecf        kfun:com.preat.peekaboo.ui.camera.AuthorizedCamera#internal.1 + 2819 
    at 6   composeui                           0x10fee611f        kfun:com.preat.peekaboo.ui.camera#PeekabooCamera(com.preat.peekaboo.ui.camera.PeekabooCameraState;androidx.compose.ui.Modifier;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>?;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} + 9563 
    at 7   composeui                           0x10feecaa7        kfun:com.preat.peekaboo.ui.camera.PeekabooCamera$lambda$4#internal + 371 
    at 8   composeui                           0x10fef0de7        kfun:com.preat.peekaboo.ui.camera.$PeekabooCamera$lambda$4$FUNCTION_REFERENCE$1.invoke#internal + 131 
    at 9   composeui                           0x10fef0f9b        kfun:com.preat.peekaboo.ui.camera.$PeekabooCamera$lambda$4$FUNCTION_REFERENCE$1.$<bridge-DNNNU>invoke(androidx.compose.runtime.Composer?;kotlin.Int){}#internal + 159 
    at 10  composeui                           0x10e2718bb        kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 115 
    at 11  composeui                           0x10e42213f        kfun:androidx.compose.runtime.RecomposeScopeImpl#compose(androidx.compose.runtime.Composer){} + 767 
    at 12  composeui                           0x10e3ea287       
neorix11 commented 8 hours ago

I'm facing a similar issue.