Error when closing iOS Maps

  

I have a navigation function to quickly navigate to a company.


The function is:

If(Index(ToLower(GetUserAgent()),"android") > -1, 
 
//great android
"google.navigation:q=" + GetCompaniesWithOrWithoutLogoes.List.Current.Company.Address,

If(Index(ToLower(GetUserAgent()),"ipad") > -1 or Index(ToLower(GetUserAgent()),"iphone") > -1 or Index(ToLower(GetUserAgent()),"ipod") > -1,

//nasty iPhone 
"http://maps.apple.com/maps?saddr=Current%20Location&daddr=" +
GetCompaniesWithOrWithoutLogoes.List.Current.Company.Address, ""))


The other urls I open with the InAppBrowser work fine, the only problem I have is when I open the Apple maps url and navigate back to my application, then I get the error and I have to shut down the app.






Anyone have any ideas on this?

Hi Lars, 

If you use a link with https (for the google maps) instead of http, it works?
I see some issues with navigating and iFrames, for example, with google using http, because of the mobile app in OutSystems using SSL...

Cheers,

Eduardo Jauch

Eduardo Jauch wrote:

Hi Lars, 

If you use a link with https (for the google maps) instead of http, it works?
I see some issues with navigating and iFrames, for example, with google using http, because of the mobile app in OutSystems using SSL...

Cheers,

Eduardo Jauch

Hi Eduardo, 

thank you for your insight, unfortunately I still get the error using https. It is only with the apple maps url on iOS that I get this problem, but not sure if that has anything to do with it.

Hi Lars.

There is a log of the error in the Service Center?

Cheers Eduardo Jauch

Eduardo Jauch wrote:

Hi Lars.

There is a log of the error in the Service Center?

Cheers Eduardo Jauch


There is no error in servicecenter, because I can't reproduce the error in my browser, only on an iOS device where I can't get to the error log on the screen that shows the error message

Solution

Hi Lars,


Can you try replacing :

"http://maps.apple.com/maps?saddr=Current%20Location&daddr=" +
GetCompaniesWithOrWithoutLogoes.List.Current.Company.Address, ""))

by:

"maps://?daddr=Current%20Location&daddr=" +
GetCompaniesWithOrWithoutLogoes.List.Current.Company.Address, ""))

It worked for me :D


Let me know if it worked.

Solution

Henrique Batista wrote:

Hi Lars,

Let me know if it worked.


Henrique you magnicifent son of a ... ! Did they start the construction for your statue yet? If not, I will single handedly build you one, because in my eyes you are thé Outsystems VIP!


It works!

AHAHAHAH

No need for a statue, but you owe me a couple of beers now :D

PS: Can you please mark the answer as the correct one? just to help others as well!