24
Views
11
Comments
Solved
mailto which invokes email apps is not working on iOS InAppBrowser
Application Type
Mobile
Service Studio Version
11.54.34 (Build 62959)

Hello,

I am using InAppBrowser to allow users to view web links. In one of the pages, there is an email link with anchor tag href to "mailto : xxxx" , upon clicking, it should trigger mobile email app with "To" address. When I tested this on Android, it was working fine but where as on iOS, nothing was happening. 

There is a call action href with "Tel: xxx" which is working fine on both Android and iOS. I am wondering, the issues with "mail to" stopped due to domain of iOS (outsystems://) or something else. 

Can someone helped me with fixing the issue? 

Thanks in advance.

2023-08-01 16-31-38
Nagaraju Gaddam
Solution

iOS is considering action URL's start with mailto, sms, tel, etc, as HTTP URL's, tries to load them like web URL's upon clicking on them which leads to Load Error. 

As a workaround solution, in Load event start listener, whenever URL contains any of the action names, I trigger window.open(ACTION_URL, "_self") which triggers the required action from the app.

UserImage.jpg
Ricardo Silva

Hey @Nagaraju Gaddam,

To provide any help, we need more details from you. What plugin method and target are you using?

BR.

2023-08-01 16-31-38
Nagaraju Gaddam

Hi Silva,

I am using InAppBrowserEvents plugin. Target is Entities.Target.IN_APP_BROWSER (_blank). 

UserImage.jpg
Ricardo Silva

Just tried using the latest version and it's working fine. Can you provide the following versions you're using:

- MABS;

- Plugin;

- iOS devices tested?

BR.

2023-08-01 16-31-38
Nagaraju Gaddam

Can you share .oml file?  I will give a try with your sample app

2023-08-01 16-31-38
Nagaraju Gaddam

Mabs - 9.0

InAppBrowser - 2.4.8

Test in iOS : 17.4.1.

UserImage.jpg
Ricardo Silva

Ok, now you're misleading me. You mentioned you were using InAppBrowserEvents (which only goes until 1.0.11) but now you mention version 2.4.8 of it (which makes me believe you're using InAppBrowser instead).

I'm aware that InAppBrowserEvents uses much of InAppBrowser inside but being accurate would make this easier for both of us.

2023-08-01 16-31-38
Nagaraju Gaddam

Sorry for the confusion, as you mentioned it's InAppBrowser Plugin - 2.4.8 consumed by InAppBrowser Events

UserImage.jpg
Ricardo Silva

Have you tried updating the plugins to the latest versions? 

2023-08-01 16-31-38
Nagaraju Gaddam

Yes, I did. Still it is not working for me. I upgraded from MABS 9 to 10 but no luck. 


UserImage.jpg
Ricardo Silva

Apologies, I just noticed I had the wrong target set. Using "_blank", there's indeed an issue when opening "mailto" URLs. 

Since the issue resides on the native layer, the plugin will need a new release to have it fixed. 

2023-08-01 16-31-38
Nagaraju Gaddam
Solution

iOS is considering action URL's start with mailto, sms, tel, etc, as HTTP URL's, tries to load them like web URL's upon clicking on them which leads to Load Error. 

As a workaround solution, in Load event start listener, whenever URL contains any of the action names, I trigger window.open(ACTION_URL, "_self") which triggers the required action from the app.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.