AppGyver employee here!
In config/application.coffee
, is your steroids.config.location = "http://localhost/index.html"
or just index.html
? Steroids serves app files via localhost (i.e. an internal web server on the phone) whereas PhoneGap uses the File protocol. Using localhost makes the WebView enforce stricter CORS rules, so you need an Access-Control-Allow-Origin
header to the server response. HTML files served via the File protocol let cross-domain requests go through without CORS headers.
You can find a test project with an AJAX test at https://github.com/appgyver/steroids-runtime-tests