diff --git a/CHANGELOG.md b/CHANGELOG.md index 972b1a98d..1065886cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - [#81](https://github.com/bumble-tech/appyx/issues/81) – Added: Support integration point for multiple roots - [#65](https://github.com/bumble-tech/appyx/pull/65) – Added: `InteropBuilderStub` and `InteropSimpleBuilderStub` testing util classes - [#47](https://github.com/bumble-tech/appyx/issues/47) – Updated: The 'customisations' module is now pure Java/Kotlin. +- [#85](https://github.com/bumble-tech/appyx/issues/85) – Updated: Improved `InteropView` error messaging when `Activity` does not implement `IntegrationPointAppyxProvider` ## 1.0-alpha03 diff --git a/interop-ribs/src/main/java/com/bumble/appyx/interop/ribs/InteropView.kt b/interop-ribs/src/main/java/com/bumble/appyx/interop/ribs/InteropView.kt index 889be34bc..76bd8a4e9 100644 --- a/interop-ribs/src/main/java/com/bumble/appyx/interop/ribs/InteropView.kt +++ b/interop-ribs/src/main/java/com/bumble/appyx/interop/ribs/InteropView.kt @@ -1,7 +1,7 @@ package com.bumble.appyx.interop.ribs +import android.app.Activity import android.content.Context -import androidx.appcompat.app.AppCompatActivity import androidx.compose.runtime.Composable import com.badoo.ribs.compose.ComposeRibView import com.badoo.ribs.compose.ComposeView @@ -46,9 +46,13 @@ internal class InteropViewImpl private constructor( } private fun retrieveIntegrationPoint(): IntegrationPoint { - val activity = context.findActivity() + val activity = context.findActivity() + check(activity != null) { + "Could not find an activity from the context: $context" + } check(activity is IntegrationPointAppyxProvider) { - "Activity where InteropNode is used must implement IntegrationPointAppyxProvider" + "Activity where InteropNode is used must implement IntegrationPointAppyxProvider. " + + "Activity: '${activity::class.java.name}', Node: '${appyxNode::class.java.name}'" } return activity.integrationPointAppyx }