8296
Views
35
Comments
Solved
Open URL in new window in IOS app
Question

When the user taps on an external link in my mobile app, the URL opens in the current window. In android, you can tap on the back button and go back to my app, but in IOS there is no way to get back to the app. I tried this, but it does not seem to work.

In the properties of the link, I used:

  • Property: target
  • Value: "_blank"


Any ideas? Thanks,

Gonzalo

2023-12-07 07-51-40
Remco Dekkinga
 
MVP
Solution

Hi Gonzalo,

You can put "external:" in front of the url to open the url in the platform default browser.

For example you want to open "https://www.google.com" in Safari

The url will be "external:https://www.google.com"

Kind regards,

Remco Dekkinga

UserImage.jpg
Gonzalo Labarca

Thanks Remco,


It worked perfectly for Android, but I get a "There was an error processing your request" error in IOS. Any suggestions?

Gonzalo


2023-12-07 07-51-40
Remco Dekkinga
 
MVP

Strange, I just tried it on my phone (apple) before I sent the solution. It worked like a charm.

Can you try to republish the app or reinstall on your iPhone to see if this solves the issue?

If this doesn't solve the issue, can you try to see for error details in the error log?

UserImage.jpg
Gonzalo Labarca

I tried republishing and re-installing, but no luck. I don't have an iPhone to test the app, so I am using an iPod touch. Would that make a difference? I believe the OS is the same.

I tested in an iPhone and does not work correctly either.

UserImage.jpg
Gonzalo Labarca

Also, When I use "External", it does  not work on the browser emulator either. This is the link to the app in Itunes. https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1252295402&mt=8

2017-07-06 09-31-00
Jasper Oudenaarden

Hi Gonzalo,

Try to add value "_system" instead of "_blank". I've had the same problem ones in an other Phonegap project.
I hope this works out for you!

Regards,
Jasper

UserImage.jpg
Gonzalo Labarca

Thanks Jasper

I tried "-system" with and without "external:" in front of the URL. It works perfect for android, but it does not for iPhone. It seems to crash

Gonzalo

2017-07-06 09-31-00
Jasper Oudenaarden

Hmm....supposed to be working. You sure you used "_system" (with underscore).

UserImage.jpg
Gonzalo Labarca

Yeah. You want me to select enter "Target" as Property and "_system" as Value, right? as the picture below?

UserImage.jpg
Gonzalo Labarca

I tried again, just in case. No luck. iPhone does not work. Android...Perfect


2017-07-06 09-31-00
Jasper Oudenaarden

Yes, but that doesn't work?
I'm afraid iOS doesn't support this anymore, your only option is then to add an inAppBrowser:
https://www.outsystems.com/forums/discussion/18203/open-link-in-system-browser-from-outsystemsnow-application/
Hope this helps!

UserImage.jpg
Gonzalo Labarca

Jasper, I am sorry but I am new to this platform and don't know how to implement this plugin. Do you have any link I can read to learn how to?


2017-07-06 09-31-00
Jasper Oudenaarden

You can install the InAppBrowser plugin from the Forge store within OutSystems Studio:
https://www.outsystems.com/forge/component/1558/inappbrowser-plugin/

It's supported and published by OutSystems. For installation guides etc. read this topic:
https://www.outsystems.com/forums/discussion/22961/using-forge-components/

UserImage.jpg
Gonzalo Labarca

Thanks for all your help


UserImage.jpg
Gonzalo Labarca

I tried creating a button and assigning a client action to the click event..


Then, I defined the client action as this

In the plugin action I set it like this:


the button does nothing....

UserImage.jpg
neoes1um neoesum

Thanks Remco,


It worked perfectly for Android, but I get a "There was an error processing your request" error in IOS. Any suggestions?

2023-12-07 07-51-40
Remco Dekkinga
 
MVP

Gonzalo,

I'm afraid that the problem with iOS is with your device. Can you share what the model of your iPod is and which version of iOS?

Kind regards,

Remco Dekkinga

UserImage.jpg
Gonzalo Labarca

Remco, 

I sincerely appreciate your help.

I am using an Ipod Touch with IOS 10.3.2. I also tried an Iphone 6 and have the same problem. If I just use the link property to "redirect to URL", the page opens in the apparenmtly as part of the application, but you just cannot go back to my screens and the user has to shut the app down and re-start. 

If i use the prefix "external:" in front of the URL, the app crashes in IOS.

I tried using the InAppBrowser plugin as shown in my pictures above, but the enabled button does nothing on either android or IOS




2018-06-11 09-12-53
Rodrigo Coutinho
Staff

Gonzalo,

Seems there is a glitch in the native shell that causes the problem you're reporting. This will be fixed and move to production during this week. 

Thanks for reporting!
R

Gonzalo Labarca wrote:

Remco, 

I sincerely appreciate your help.

I am using an Ipod Touch with IOS 10.3.2. I also tried an Iphone 6 and have the same problem. If I just use the link property to "redirect to URL", the page opens in the apparenmtly as part of the application, but you just cannot go back to my screens and the user has to shut the app down and re-start. 

If i use the prefix "external:" in front of the URL, the app crashes in IOS.

I tried using the InAppBrowser plugin as shown in my pictures above, but the enabled button does nothing on either android or IOS






UserImage.jpg
Bram van Mensvoort

Hi Rodrigo,

Nice to read the good news.

In the latest release (https://success.outsystems.com/Documentation/10/Release_Notes/Development_Environment_10.0.611.0), I don't see a mention about it yet.

Which of the three problems will be resolved in the upcoming version? (1. Redirect to URL property, 2. crash in iOS for 'external:', or 3. InAppBrowser plugin which does nothing).

We encounter problem 2 as well.

Rodrigo Coutinho wrote:

Gonzalo,

Seems there is a glitch in the native shell that causes the problem you're reporting. This will be fixed and move to production during this week. 

Gonzalo Labarca wrote:

Remco, 

I am using an Ipod Touch with IOS 10.3.2. I also tried an Iphone 6 and have the same problem. If I just use the link property to "redirect to URL", the page opens in the apparenmtly as part of the application, but you just cannot go back to my screens and the user has to shut the app down and re-start. 

If i use the prefix "external:" in front of the URL, the app crashes in IOS.

I tried using the InAppBrowser plugin as shown in my pictures above, but the enabled button does nothing on either android or IOS

2019-09-17 09-11-00
João Pedro Abreu
Staff

Gonzalo,

I'm using that plugin for a scenario exactly like yours and it works well. Have you generated a new build of your application and installed it on the devices you are using to test? Nothing happening when you click the button sounds like what would happen if the installed application didn't include the InAppBrowser plugin.

UserImage.jpg
Bram van Mensvoort

Update:

After the upgrade it seems to go well on iOS and Android.

We translate our links to: <a href="external:https://..">

UserImage.jpg
Guilherme Jesus

Hey Rodrigo, hope you're fine.


I'm facing the same issue that was reported here.

In Android devices works well, that opens a new window in system browser or in the corresponding app. But in the iOS devices (iPhone 7 version 11.2.5) clicking in the link nothing happens.

I am using this solution: <a href="external:https://..">



Is it possible the native shell isn't prepared for this ios version? I have no possibility to test in other version.


Cheers,

Guilherme


Rodrigo Coutinho wrote:

Gonzalo,

Seems there is a glitch in the native shell that causes the problem you're reporting. This will be fixed and move to production during this week. 

Thanks for reporting!
R


UserImage.jpg
Guilherme Jesus

Can anyone help on this issue?

UserImage.jpg
Jacob J

Guilherme Jesus wrote:

Can anyone help on this issue?

Im also having some issues with iOS external links,

works fine in OutsystemsNow and native android but not in native iOS.


2019-12-23 13-54-26
Niek de Jong

I have read this topic and this answer has worked for me without using a plugin.

Add Javascript to the onclick handler of your button/link:

window.open('https://www.google.com', '_system');

On iOS it is working :)

UserImage.jpg
Jaakko kallio

Niek de Jong wrote:

I have read this topic and this answer has worked for me without using a plugin.

Add Javascript to the onclick handler of your button/link:

window.open('https://www.google.com', '_system');

On iOS it is working :)

Yeah it opens browser (safari) but you cant navigate back to app. 


UserImage.jpg
Leon Jiang

I had the same problem, but I didn't want to use an external browser?

If you use the app to jump to the URL, can you just jump the page in the middle of the blank area, and the navigation bar will remain unchanged?

UserImage.jpg
Leon Jiang

Leon Jiang wrote:

I had the same problem, but I didn't want to use an external browser?

If you use the app to jump to the URL, can you just jump the page in the middle of the blank area, and the navigation bar will remain unchanged?


have some people can help me ?

2023-12-07 07-51-40
Remco Dekkinga
 
MVP

Hi Leon,

You can use the InAppBrowser plug-in to show the page inside your application. 

Kind regards,

Remco Dekkinga

UserImage.jpg
Leon Jiang

Remco Dekkinga wrote:

Hi Leon,

You can use the InAppBrowser plug-in to show the page inside your application. 

Kind regards,

Remco Dekkinga


Hi Remco 

   Thanks for your help.

    I use "external:https:xxxx" can open safari to open this url . 

    But  I don't want to use external browser like : safari .  I just want to open url by app .like as below :

But I find out The navigation bar up and down disappears ?


Can I just open the url page in blank space?

please help me .

thank you 


2023-12-07 07-51-40
Remco Dekkinga
 
MVP

Hi Leon,

Why didn't you read my reaction? You shouldn't use "external", but the InAppBrowser plugin to open a browser window in your application. This way you won't loose your title and button bars.

Kind regards,

Remco Dekkinga

UserImage.jpg
Leon Jiang

Remco Dekkinga wrote:

Hi Leon,

Why didn't you read my reaction? You shouldn't use "external", but the InAppBrowser plugin to open a browser window in your application. This way you won't loose your title and button bars.

Kind regards,

Remco Dekkinga


Hi Remco 

  When i install this plugin ,but still is unsuccessful , like as below :

UserImage.jpg
Leon Jiang

Remco Dekkinga wrote:

Hi Leon,

Why didn't you read my reaction? You shouldn't use "external", but the InAppBrowser plugin to open a browser window in your application. This way you won't loose your title and button bars.

Kind regards,

Remco Dekkinga


Thanks for your help  , I had resolved this problem 

UserImage.jpg
RAFAEL FERREIRA

Leon Jiang,



What was your solution?

Using external in IOS nothing happens. Using js I can not go back to application.

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