Your instinct is right. The app you create with Publish > Test on this computer will happily serve other devices on your network. The catch is the Start Test button: like Run, it's deliberately loopback-only (private address, random port each run), so nothing outside your computer can reach it. To test from your iPhone, start the published executable yourself:
Choose Solution > Publish > Test on this computer > Create App as before.
In the results window, choose Reveal Executable to see where the app was created (a single self-contained executable in your project's Publish folder).
Run it in a terminal - drag the executable into Terminal so the path is filled in for you - with no arguments:
/path/to/Publish/MyApp/target/MyApp
With the default settings it prints Web application listening on http://0.0.0.0:8080/, which means it is accepting connections on all of this computer's addresses. You can add --urls http://0.0.0.0:8080 to be explicit, or pick a different port.
- Find your Mac's address on that Wi-Fi network (System Settings > Wi-Fi > Details, or run
ipconfig getifaddr en0 in Terminal), then open http://that-address:8080 in Safari on the iPhone.
If the phone still can't connect, check:
- Firewall - the first launch should prompt to allow incoming network connections; choose Allow (otherwise add it under System Settings > Network > Firewall).
- Both devices are on the same network, and it isn't a guest network that isolates clients from each other.
- Project Settings > Web > Published Application Defaults controls the built-in listen port and whether the app binds All interfaces (the default) or This computer only; those choices are baked into the published app.
Don't set --public-url for this kind of testing - that option is for production deployments behind a reverse proxy where the public address differs from the listening address. Press Ctrl+C in the terminal when you're finished.
The Web getting-started guide covers this case in its troubleshooting table ("A published app works locally but cannot be reached from another computer"): https://docs.objo.dev/web-getting-started
I've also logged a feature request to make this a one-click option - a Start Test mode that serves the app on the local network and shows the address to open from your phone: https://feedback.objo.dev/feature/1681