Can’t connect remotely via the iPhone app but I can via safari?

When I try and connect to home assistant via the app I get an error

The address I use is a duck dns address.
When I type this in the browser I can connect without problem, so why does it not work in the app?