Last Updated: February 25, 2016
· jbleuzen

Publish a temporary Bonjour service for easy iOS testing

Sometimes you may want to access a development server from an iOS device, but you can't modify hosts without jailbreaking your device.

Just type the following command in a terminal, and replace "my_api" with what you want, to publish a HTTP server to Bonjour :

dns-sd -P my_api _http._tcp local 80 my_api.local %YOUR_IP% path=/

Once the service published, your device will be able to reach "http://my_api.local"
Don't forget that your server will have to respond to request from the "my_api.local" domain, but you can easily add a ServerAlias for that (for Apache).

1 Response
Add your response


Yahoo!!!! Thanks!!!

over 1 year ago ·