Even though this worked on the web along with --livereload
the issue all along was with a script href url.
The problem: The google maps js
link was using "//url.to.site" so I had to manually prepend "http:" and voila.
How to properly debug ionic + angularjs apps on iOS devices
Debugging this was terrible until I came with up a good solution. Beware: this requires OS X or some serious hacking skills.
Here are the steps in order:
$ ionic build ios
- Open
TheApp/platforms/ios/TheApp.xcworkspace
in Xcode
- Build/Run the app in xcode to device OR simulator
- Open Safari w/ Developer Mode enabled (Preferences > Advanced > Show Develop menu in menu bar)
- In the Safari menu select
Debug
> [Name of iOS device]
> index.html
- While the Inspector window is active, hit CMD+R (refresh) and you'll be able to watch your
console.logs
from the beginning of the page load.
EDIT Shortcut: You can skip steps 1-3 if you use $ ionic run ios --device
This is awesome because now you can step through your code on an actual iOS device! I hope this will save some of you heaps of time. Best of luck!
For Android Devices
Thanks to @sajclarke I found this article: https://developer.chrome.com/devtools/docs/remote-debugging