Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Issues with invoking navigator from app

I am experiencing issues with invocation of navigator from within my app as tested on iOS device.

When I invoke the following JS on click of a listItem on a page things work perfectly well and a new page with apple maps navigator opens up:

code
var uriDestString = "maps:daddr=" + someAddress;
window.location = uriDestString;
/code

However when the above JS is invoked on click of a pop-up which opens when a marker on a map is clicked, nothing happens and the navigator does not launch. Note that without the recent Appery upgrade things seem to be fine which leads me to believe that it is a problem with your upgraded libraries. When I change the above JS associated with click of a pop-up from a marker to the following:

code
var uriDestString = "http://maps.apple.com/?daddr=" + someAddress;
window.open(uriDestString, '_blank');
window.focus();
/code

things work fine on browser on MAC, but when tested on device, mysteriously google.com/maps opens up when I would want the navigator associated natively with the device (Apple maps) to launch? I've tested on two different iPhones with this same anomaly.

Are these bugs in Appery?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Issues with invoking navigator from app

Hi Cody,

Strange problem,

Please make sure your event handler run correctly:

pre

alert("before code");

var uriDestString = "maps:daddr=" + someAddress;
window.location.href = uriDestString;

alert("after code");

/pre

Also please try to hard code uriDestString to make sure there is not problem with address calculation.

Regards.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Issues with invoking navigator from app

Hi Yurii,

I have indeed tried alerts. The code execution does goes inside the listener event handler at right place: so thats not an issue. Have also tried hard coding address: but same issues as I described (again, on click of a pop-up designed to open when a marker on map is clicked. As I said, things work well in your previous build. Hence I think its a glitch with your upgrades. I'd appreciate resolution.

Regards.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Issues with invoking navigator from app

Hi Cody,

Please specify worked code on old builder(with hardcode values).

We will test it on old builder and new builder.

Many thanks.

Regards.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Issues with invoking navigator from app

Hi Yurii

I am sending the steps to reproduce at support@appery, along with pointer to backup version that uses your old libraries where this issue doesn't surface up. Please advise of resolution here.

Regards.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Issues with invoking navigator from app

Hi Cody,

In your app version 187v you have other code that's opens new window.

Take a look on the screen shot:

http://prntscr.com/5igesj/direct

Exactly this code opens new window(i've tried it in debugger).

This code locates in the "success" mapping in the bottom of the code.. Also you have there other code(with just "window.location"). But that code runs after you click on popup.

So you should use in your app window.open if you want to get the same result as in 187v.

Regards.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Issues with invoking navigator from app

Hi Yurii,

Thanks for looking into the code for the two versions. Unfortunately, I have to report this neither addresses nor solves the problem. In V187 the navigator opens correctly on iOS device on click of popup and the extra window.open line of code you identified just opens an extra window (which is actually not needed and this line should have been commented out in the code). To clarify once more, and as I indicated in the very beginning, the issue is on iOS device.

Regardless, for the sake of checking, I have changed the implementation (of present version) to exactly the same as in V187 and while in V187 the navigator invokes perfectly well when popup is clicked, in current version with your upgrades, navigator is never invoked (just a window opens but loads nothing).

Once again I am increasingly of the belief there is problem with your upgrades. My main issue however is that I want the current implementation to work: so if you can suggest a way for me to get what I want to work that will suffice.

Regards.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Issues with invoking navigator from app

Hi Cody,

When i tested, i saw big difference between these versions. And tried to find why. And found it.

We will test it on the ios.

Regards

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Issues with invoking navigator from app

Hi Yurii,

Thanks for the update.

I'll look forward to recommendations for iOS. I would recommend continuity if your team does an internal handover to solve these reported issues. I've answered questions above and think you're on top of what the problem is.

Regards.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Issues with invoking navigator from app

Could you share the anticipated timeframe for a fix to this issue? I believe I received an email notification Jan 13 mentioning this is a known bug in Appery. The issue has been outstanding for a month from report date - will appreciate clarity.

Return to “Issues”