views:

607

answers:

2

Does anyone know if there is a way (or tool) we can use to view the source HTML of a web page displayed on the iPhone Simulator (I know there is an "iPhone Web Developer Tool" but it is intended to be used on a real iPhone device, while I want to get the same but on the iPhone Simulator while developing a WebApp). Any help is appreciated.

+1  A: 

Any reason you can't use a normal browser to get the source? You can make your browser pretend to be an iPhone if the issue is that they're detecting iPhones and sending different content to it.

ceejayoz
Not really sure what you intend to say: if you try to access http://www.bankofamerica.com/mobile with a Safari browser on a MAC OSX or even a Windows PC and try to view the HTML generated: you will see womething completely different from what you see on your iPhone or iPhone simulator, so how can I see what is the HTML which is generated for the iPhone?
Roberto
You need to make your browser pretend to be an iPhone. http://www.mydigitallife.info/2008/06/28/how-to-emulate-iphone-change-user-agent-in-safari-and-firefox-web-browser/
ceejayoz
A: 

How about try using iPhoney?

You could also try iPhone Tester.

Epsilon Prime
I've downloaded, compiled and executed iPhoney: if I access http://www.bankofamerica.com/mobile with iPhoney and with the iPhone Simulator I get two very different pages, so na way to see the real HTML for that page on the iPhone (maybe the iPhoney user agent is different from the iPhone Simulator). So problem not solved.
Roberto
Odd, it might not. Did you try iPhone Tester? In Firefox I get the 4 option Mobile Banking screen. Right clicking the frame and selecting "This Frame -> View Source" gets me the very simple source for the Bank of America mobile site.
Epsilon Prime
What you get with Firefox is not what you *get* with iPhone, it's completely different and that is the problem. If you go to the site with FF, Safari or whatever you want you get an HTML page which is a stripped down version of what you get with iPhone. You cannot understand what I'm talking about if you don't have access to an iPhone or an iPhone Simulator. Anyway I've solved the problem: I've modified the info.plist of the iPhoney application you suggested and it's working the same way as the iPhone Simulator. So, thnak you for the suggestion.
Roberto