@Gargron I think user should have a VPN or proxy that connects to Tor network for reach .onion domains with iOS (if app doesn't including extra validation for domains). technically every app can implement Tor daemon separately, but it is really rare.
but many .onion websites are only using HTTP, and plain HTTP requests are blocked by default on iOS by App Transport Security. If you want to connect plain HTTP mastodon servers on your app, you should change ATS settings to allow HTTP requests.