Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text editor keyboard shortcut that will refresh iOS Simulator's Safari browser?

In text editors like TextMate, pressing

COMMAND + R

will save the html document, switch to a browser like Chrome, and refresh the page.

So the question is, how does one use this keyboard shortcut to refresh the Safari browser within the iOS Simulator?

Is there another editor or program that's more interactive when developing for Safari on iOS?

Thanks for your help.

like image 788
s2t2 Avatar asked Dec 23 '11 07:12

s2t2


2 Answers

There's no shortcut within the simulator but if you set up Safari's enable Safari's developer tools (on your desktop) you can use that to debug the simulator. If you have dev tools open, the CMD + R shortcut will refresh the simulator.

Safari > Developer Tools > iPhone Simulator > name of your app

Then CMD + R will make it a lot easier for you!

like image 195
Jeremy P. Beasley Avatar answered Nov 16 '22 19:11

Jeremy P. Beasley


there is no way to do this by default, but if you're comfortable with working in the shell (e.g. Terminal.app) you could look into something like this command line tool:

https://github.com/fingertips/ios-sim

not sure if you can launch built in apps like safari, tho.

one thing that may be of use is that in desktop safari, if you enable the Develop menu you can set your user agent to be iphone/ipod touch/ipad. i'm not sure how accurate this is, but it might be faster for iterating. (if you don't see the Develop menu in desktop safari, go to preferences, select Advanced and make sure the "Show Develop menu in menu bar" checkbox is checked)

like image 39
Mike K Avatar answered Nov 16 '22 17:11

Mike K