airbnb / DeepLinkDispatch

A simple, annotation-based library for making deep link handling better on Android
http://nerds.airbnb.com/deeplinkdispatch/
4.37k stars 407 forks source link

DeepLink Error: Dee3p link to non-existent method on Production #287

Open thesultanster opened 4 years ago

thesultanster commented 4 years ago

Our app links and deeplinks work on a dev build. However once we test a production build, non of the deeplink or applinks work.

We instead get an error that is caught by our DeepLinkReceiver

The following error message is logged when trying to launch a deeplink.

Error Stacktrace

E/DeepLinkReceiver:15: DeepLink Error: Dee3p link to non-existent method: createExploreIntent (We called a deeplink that goes to an explore page in this example)

I suspect this issue might be with our pro guard rules?

Our Pro Guard Rules


-keep class com.airbnb.deeplinkdispatch.** { *; }
-keep @interface com.getsomeheadspace.android.common.deeplink.HeadspaceAppLink
-keep @interface com.getsomeheadspace.android.common.deeplink.HeadspaceDeepLink
-keepclasseswithmembers class * {
    @com.airbnb.deeplinkdispatch.DeepLink <methods>;
    @com.getsomeheadspace.android.common.deeplink.HeadspaceAppLink <methods>;
    @com.getsomeheadspace.android.common.deeplink.HeadspaceDeepLink <methods>;
}
yolapop commented 3 years ago

How did you declare HeadspaceAppLink?

If you are using Kotlin, don't forget to set the retention to BINARY

@DeepLinkSpec(prefix = ["something"])
@Retention(AnnotationRetention.BINARY)
annotation class AppDeeplink(val value: Array<String>)