'Swift open url but prevent an external app to open

I want to open an url (e.g. of PayPal) but want to prevent to open the corresponding app that is linked with the url (PayPal app). Is it possible to open the link, but not allowing the system to automatically open the corresponding app (e.g. PayPal)?

I use

let urlString = "https://www.paypal.me/username/0.01"
guard let url = URL(string: urlString) else {
    return
}
UIApplication.shared.open(url)

The reason I want the url be opened in the browser is because the PayPal-app has a bug working with PayPal.me - links.



Solution 1:[1]

Maybe I'm missing some constraints you have, but did you try to open the link within the application for example in a SFSafariViewController or a WKWebView? - https://www.hackingwithswift.com/read/32/3/how-to-use-sfsafariviewcontroller-to-browse-a-web-page

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CloudBalancing