InterApp.onReceivedUri not working!

InterApp doesn’t log the uri & onReceivedUri not triggering!

var InterApp = require('FuseJS/InterApp');
InterApp.onReceivedUri = function(uri){
    console.log(uri);
}

"Mobile": {
  "KeepAlive": true,
  "ShowStatusbar": true,
  "RunsInBackground": true,
  "Orientations": "Portrait",
  "UriScheme":"apcnappnew"
},
 "Packages": [
        "Fuse.Animations",
        "Fuse.BasicTheme",
        "Fuse.Themes",
        "Fuse.Controls",
        "Fuse.Designer",
        "Fuse.Drawing",
        "Fuse.Drawing.Primitives",
        "Fuse.Effects",
        "Fuse.Elements",
        "Fuse.Entities",
        "Fuse.Gestures",
        "Fuse.Navigation",
        "Fuse.Scripting",
        "Fuse.Shapes",
        "Fuse.Triggers",
        "Fuse.Reactive",
        "Fuse.Android",
        "Fuse.Desktop",
        "Fuse.iOS",
        "Fuse.UserEvents",
        "FuseCore",
        "Uno.Collections",
        "Uno.Geometry",
        "Fuse.Launcher",
        "ObjC",
        "Android",
        "Experimental.iOS",
        "Fuse.PushNotifications"
  ],

Is there anything missing? Thanks Fayez

What platform are you testing on (device and OS), and which version of Fuse are you using?

Hi Remi,

My device is android 5.1.1 my OS is OSX 10.11.3 and fuse version is 0.12.2(build 6312)

And I tested it on iphone 6s and didn’t work

Thanks

Does it fail on both the Android device and the iPhone? Or just on one of them?

How do you test it? From what kind of other app are you trying to open the URI?

I just tested on Android (using a different Fuse-app to trigger the first one, through InterApp.launchUri ('apcnappnew://some/uri');) and everything worked as expected there

Hi I tested it using the following, and it failed on both!

I think the problem with onReceivedUri somehow!

InterApp.onReceivedUri = function(uri){
    console.log(uri);
    loggedIn.value = true;
    showLogin.value = false;
    bootUp.value=false;
}

But from where did you try to start it? Did you try to get some other app to open a URI starting with apcnappnew://?

yes i tried it on browser and passed apcnappnew://token and it opened the app but the token not passed.

Thanks, I’ve managed to reproduce the issue now. Raising a ticket for it, we’ll let you know as soon as there’s any progress.

Thanks, I appreciate if you can consider this as urgent one becuase the client is waiting his app and I stucked at this point.

Another note is that, the old version “0.11.1” wasn’t raising me the bug, if you could send me the older version, it will be fast solution for me.

We’ll take a closer look at it asap. In the meantime here’s 0.11.1 for windows and osx

Thanks Remi

And we have now found and fixed the issue internally. We’ll get the fix out in a release fairly soon.

Thanks, that’s great

A fix for this issue is included in Fuse 0.12.3, which is now available on the QA channel. It is scheduled for official release tomorrow.

https://www.fusetools.com/downloads/channel/qa

Thanks All, I’ve another interesting bug:

I writed uno code and included the following packages:

[ForeignInclude(Language.ObjC, "AddressBook/AddressBook.h","AddressBook/ABPerson.h","AddressBook/ABMultiValue.h")]

When I run xcode I’ve to add its dependencies manually on “link with binary with libraries” section!

I think it should be automaticlly included.

Hey!

There is no general way for Uno to figure out what frameworks are needed just from a set of header includes, so you have to use e.g. the attribute [Require("Xcode.Framework", "AddressBook.framework")] to get that working.

(If your frameworks are not from the iPhone SDK you can use [Require("Xcode.Framework", "@('relative/path/to.framework':Path)")] (or Xcode.EmbeddedFramework for embedding the framework) and [Require("Xcode.FrameworkDirectory", "@('relative/path/':Path)")].)

Hope that helps!

Thanks, it works

yeah it worked for me