title: Access-Control-Allow-Origin in phonegap
body: <p>I decided to develop an app that uses a public API which provides time schedules for buses and subways in a city.</p>
  
  <p>I decided to develop this app using HTML5 so that through the use of something like phonegap I would be able to deploy for multiple platforms.</p>
  
  <p>During the development I discovered that I couldn't access the JSON response from the API due to the <strong>xmlhttprequest-cannot-load No 'Access-Control-Allow-Origin' header is present on the requested resource</strong></p>
  
  <p>So i decided to use a normal provider webspace as a bridge with a php function to which i send the request and that is able to get the response from that API service and send back to my HTML page the JSON result.</p>
  
  <p>I have two questions for which also a starting page or a clue would be appreciated:
  1) This problem of the Access-Control-Allow-Origin is something that would appear also if I developed the app in native code (java and ObjC)?</p>
  
  <p>2) If the HTML5 and the javascript is compiled by phonegap I will be still unable to access that API service and I will still have the same problem and I will still have to use the php bridge?</p>