Chaintech-Network / ComposeMultiplatformMediaPlayer

Apache License 2.0
277 stars 19 forks source link

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

Closed ArisGuimera closed 6 days ago

ArisGuimera commented 1 week ago
composeMultiplatformMediaPlayer = "1.0.19"
kotlin = "2.0.20"
compose-plugin = "1.7.0-beta02"

Simulator: iPhone 15, on android works fine.

Logs:

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>}

My implementation:

 YouTubePlayerView(
            modifier = Modifier.fillMaxSize(), videoId = "https://www.youtube.com/watch?v=6rk-zpAj7w8&ab_channel=TIDAL"
        )

EDIT: I also tried with:

VideoPlayerView(modifier = Modifier.fillMaxSize(), url = "https://firebasestorage.googleapis.com/v0/b/analyticscrashlytics-28446.appspot.com/o/RICK%20Y%20MORTY%20(Trailer%20espan%CC%83ol).mp4?alt=media&token=67fca3aa-17c8-4f10-9af6-c92c7c6fb6ae")

And still have the same error

Kerubel-Abera commented 1 week ago

+1 but using kotlin 2.0.0 and compose-plugin 1.6.11

shageldi-dev commented 1 week ago

after upgrading my compose plugin version and Kotlin version, got issue in iOS build:

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,kotlin.Unit>?;kotlin.Boolean;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){0§}[0]'

my current compose-plugin version: 1.7.0-beta02 my Kotlin version: 2.0.20

maybe problem from this changes, maybe your UIKitView deprecated: https://github.com/JetBrains/compose-multiplatform-core/pull/1494

ctn-mobile-innovation commented 1 week ago

Please check in latest version

shageldi-dev commented 6 days ago

Fixed thanks