cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Santana <csantan...@gmail.com>
Subject getting tired of using mouse to open safari to inspect and magic path for livereload
Date Fri, 22 Aug 2014 15:31:56 GMT
I was going down the rabbit whole to see if there is a way I can launch the
safari debugger after doing a "cordova emulate ios", and maybe adding a cli
command "cordova inspect ios"

It's kind of annoying because every time you do a build/emulate the safari
window that is current debugging closes. and you have to again
"Develop->Inspect Simulator->index.html"

option 1: apple script to mimix what the mouse is doing with the menu
option 2: somehow call the webkit/safari debugger with the correct path
after figuring it out
(i.e. file:///Users/csantana23/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/1A843146-C97F-457B-A832-4A6BA5FF9F19/HelloCordova.app/www/index.html)

Anyone know how to programmatically call from command line the webkit
debugger that makes it attached to the simulator?

I was able to open safari window with the path but it doesn't attached.


When I was looking the value  of document.location.href
I notice that
that 1A843146-C97F-457B-A832-4A6BA5FF9F19/HelloCordova.app/www/
is live content, I went ahead and updated some files (i.e. index.js,
logo.png) and did a document.location.reload() and it pickup the changes in
the simulator.

I know there is another way to do livereload by loading a url in
config.xml, but I think this could be another alternative because sometimes
you want to simulate or need local files and the url to be file:// for some
close testing to reality.

With some tooling and "magic" maybe we can do some livereload cli command.
Food for thought on that one :-)


-- 
Carlos Santana
<csantana23@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message