127.0.0.1 is usually just the own network address. Go to your router settings and find out the local IP address of the device that you want to connect to, then enter that IP address into the Aerofly FS settings menu. Please also verify in the router settings that the port forwarding for the 58585 port is enabled, i.e. opening the firewall of the router as well. You can also specify a different port and defined a range of ports that are open. But this depends on your router and just switching routers might not fix this as each router has its own firewall settings that you need to configure first.
Where do you suggest I enter the IP address of the device I want to connect to. Is it the broadcast address panel? I was under the impression that I have to enter the IP address of my mac (running the sim) into the FS widgets app settings on my iPad. Is this correct?
I also just entered the "python3 -m http.server 58585" command into my terminal on mac and then tried connecting the FSWidgets app. The app was able to connect (however the airplane icon was not in the right place due to it not actually getting any information) but the app was able to establish a connection which means network wise there are no issues and it is in fact something with the sim that isn't working properly.