Open URL in my application

Can I make the link open in my application, and not in the browser. The “Open URL or file” event does not suit me, as it sends it to the browser.

Not anymore since beta104.
Maybe someone can add both options in the future.

Opening in the application is a bad idea, because it is an electron app, meaning that unlike on normal browsers, websites can have access to everything (files, hardware, system APIs…), and electron being well known I wouldn’t be surprised if many websites use compromised libraries that await someone opening the website in electron to do bad stuff.

3 Likes

For the reasons arthuro555 mentioned, Apple also doesn’t allow you anymore to publish apps in the App Store if you open websites in your app, instead they want you to open websites in Safari.
In case you have a very good reason to open websites inside your app, beginning 2021, Apple force developers to use their new WkWebView class, which has built-in protection from the threats arthuro555 mentioned and keep separate the web and app content and disable all remote JS code. So if you want to run any JS within your macOS and iOS app, it must be included with the app can not be loaded from a website anymore (if you want to publish in the App Store).

I don’t know about Microsoft and Google but I can imagine in the future they also going to introduce something similar as such restriction makes total sense from security point of view.

3 Likes

Okay, but if I have my own website that has news about the game and I’m sure it’s safe. Can I do this (open in the game, not in the browser)?

Okay, but if I have my own website that has news about the game and I’m sure it’s safe. Can I do this (open in the game, not in the browser)???

As far as I know it is not currently possible with GDevelop.
But even if it was possible, I’ve seen Apple rejected apps because the embedded website in the app was no different than opening the website in Safari. Apple really want you to open websites in Safari and they don’t want to see websites opened inside the apps because anything can happen on the website that Apple can not monitor. You can display illegal and harmful content…etc

If you want to display news, you could store the news in a database and load it in to your app as JSON. For example the Facebook app is not just embed the Facebook website in to an app, but fetch the data from the servers and uses native controllers to display the data like comments, messages, images…etc
This is how you need to do it.

I think there might be a way. I have never tried this but maybe you can go to the application you want the link to open in, then try copying and pasting the link there. On the preview, the link MIGHT OR MIGHT NOT be forced to open in that application.