lostInTransit
lostInTransit

Reputation: 70997

iPhone - access XAMPP server (localhost) on my mac in the same network

I want to create an iPhone app which makes calls to a web service. For testing, I want to first create the API calls on my mac (server running XAMPP) and if it works fine there I want to port it to the actual server.

If my iPhone and mac are on the same network, can I access the web service using the IP address of my mac?

Thanks.

Upvotes: 3

Views: 11598

Answers (4)

keif
keif

Reputation: 573

What I do:

Connected to the same network, I go in to the wireless settings and create a manual proxy that points to my machine. I use Charles proxy for testing a lot/seeing traffic, works like a charm and it lets me use my macbook hosts file so I don't need to do any funky listening rules in apache - just the same vhost settings I use on my machine already.

http://www.charlesproxy.com/documentation/faqs/using-charles-from-an-iphone/

Upvotes: 0

Randy
Randy

Reputation: 56

Any time someone answers with "why not," ignore the post. This just takes up space and adds absolutely no value...their post imitating their life.

Anyway, I access my laptop localhost (WAMP stack) from my iPod Touch by entering the IP address of my laptop on my Touch location bar. There is some configuration that needs to happen for this to work. I found what I needed at:

http://www.frihost.com/forums/vt-88381.html

Good Luck!

Upvotes: 4

Wil
Wil

Reputation: 10604

I can not speak about actual development, however I access intranet pages from a Ipod Touch all the time by either typing http ://ip or http://local_dns_name

As long as the iphone / ipod is on the network correctly (e.g. through standard wifi and not 3g/whatever) you should be able to access any and all local resources.

Upvotes: 2

HyLian
HyLian

Reputation: 5093

Why not?

Have you tried it and have some problems?

Upvotes: -3

Related Questions