From d01dd6921edcb6e37e85132b3752864e86915b93 Mon Sep 17 00:00:00 2001 From: Manel Martos Date: Mon, 8 Jan 2024 16:59:19 +0100 Subject: [PATCH] Avoid exposing 'DerivedSetup' methond in ObjC as it introduces a compilation error while targetting iOS --- .../kotlin/com/bumble/appyx/navigation/node/Node.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/Node.kt b/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/Node.kt index b79cb35bb..f63214468 100644 --- a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/Node.kt +++ b/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/Node.kt @@ -30,6 +30,8 @@ import com.bumble.appyx.navigation.store.RetainedInstanceStore import com.bumble.appyx.utils.multiplatform.BuildFlags import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.withContext +import kotlin.experimental.ExperimentalObjCRefinement +import kotlin.native.HiddenFromObjC @Suppress("TooManyFunctions") @Stable @@ -121,7 +123,14 @@ open class Node internal constructor( } } + /** + * Exposing this method to ObjC causes compilation time errors while targeting iOS, that's why + * we've to annotate this method with @HiddenFromObjC. More details in the thread below: + * https://kotlinlang.slack.com/archives/C05FPNA6P27/p1699883454768869. + */ @Composable + @OptIn(ExperimentalObjCRefinement::class) + @HiddenFromObjC protected open fun DerivedSetup() { }