iPhone Browser simulator for Windows?

2019-01-31 10:48发布

问题:

Note: This is a question about simulating the Browser on the iPhone, not simulating the whole device. I know that iPhone-device simulation is not possible on Windows, as discussed at length here.

I have a web site that looks really weird when viewed on an iPhone - its some sort of CSS issue.

The same issue does not occur when I view the site in Safari for Windows (or any other Windows browser for that matter).

So, are there any good iPhone Browser simulators that run on windows? I.e. that render a site in the same way that the iPhone browser does.

Bonus points if there's some way of inspecting the CSS in detail, as with Chrome's 'inspect element' developer feature.

edit: for the curious, the rendering problem that I'm trying to solve is described here: CSS background image rendering differently on iPhone

回答1:

You can simulate the iPhone user agent in Safari 5 if you set up the Developers menu item in Preferences>Advanced. The webkit engine in Safari 5 is similar to iPhone's browser so most of the HTML 5 stuff works the same. As a bonus the Developer's tab allows you to debug JavaScript and some CSS (not so well supported).



回答2:

I tried all of the options mentioned and didn't like them (basically because they don't show platform-specific components, which is interesting for demonstration purposes).

If this applies for you guys, I'd recommend http://www.browserstack.com/

Unfortunately, it's not free.



回答3:

[I know the question's quite old now, but maybe my answer might help people coming in with the same query...]

I have found the Google Canary browser's emulator to be one of the best and quickest for testing browser compatibility issues on a windows machine.

It even emulates the iphone's 2x device pixel ratio.

Definitely give it a try and see if it reproduces your issue:

http://www.google.co.in/intl/en/chrome/browser/canary.html

To try out the emulation, hit F12 and below the usual row of dev tools, you will see the second row like in this screenshot...

Plus, it also renders many of the popular device browsers out there...

Hope this helps.



回答4:

Try these. I tried this in chrome, and sites i visited loaded the non-iphone version. Maybe safari would be better.

http://www.testiphone.com

http://iphonetester.com

UPDATE: After further research, looks like these really only limit the screen size, and dont use the iOS Safari rendering engine.



回答5:

I'll start off the answers:

Blackbaud labs have an open-source, Abode Air powered iPhone browser sim here:

edit: new link: ibbdemo2
(go to downloads link to get .air binary. You need Adobe Air installed)

Unfortunately it doesn't reproduce my particular problem, so it must be rendering differently.