Deeplinks and Index App Content

Hi all, I have an Ionic 3 app that uses both Deeplinks and Index App Content Cordova and Ionic Native plugins.

Individually these plugins work fine. When installed together - the Deeplinks plugin stops the Index App Content plugin from working. My problem is, I need both of these plugins to work.

The specific problem is, when a spotlight search item is pressed, the app opens, however I get
“Another implementation (e.g. plugin) already handled that userActivity” logged from the Index App Content plugin.

Has anyone successfully implemented both of these plugins? Or does anyone have a suggestion to make these work together?

I am using Deeplinks 4.20.0 and Index App Content 4.18.0

Thanks! Chris

Hi Chris,
today i ran into the same issue. Seems to be a bug within IonicDeeplink plugin. The handled flag is completely ignored (the if condition is empty) and always YES is provided as method result. This actually marks the activity as processed so that the later called IndexAppContent assume it has been already handled.
To fix it the return value must be changed (return handled instead of return YES) - see attached screenshot

Hey thanks for your reply. I figured out a very similar solution to you. Did you manage to get this working when the app being launched is opening from being force closed? Or does this only work when the app is sitting in the background?

Hi,
for me it works in both cases, when app is in background and when app is being “cold” started (actually not running at all).
I also ran into an other issue with the IndexAppContent plugin. The IndexAppContent plugin implements a Native-side check for existance of a JS onItemPressed function (see AppDelegate(IndexAppContent) / callJavascriptFunctionWhenAvailable) which actually do not exist (anymore?).

So the click event was never raised in my Ionic app.
For me the IndexAppContent plugin only works correctly if I add a dummy JS function inside my index.html like this:

if(window.plugins.indexAppContent && !window.plugins.indexAppContent.onItemPressed) {
   window.plugins.indexAppContent.onItemPressed = function(event) {
      // do nothing
   }
}

Not sure if you have the same issue, because I use the GitHub version directly instead of the last version from NPM, that I never got running.