On Thu, May 3, 2012 at 1:50 PM, Filip Maj <[email protected]> wrote: > https://issues.apache.org/jira/browse/CB-385 > > This issue proposes the idea of checking that the native platform the app > is running on matches the platform the .js file is built for. > > The question is: how? >
So, the .js knows what platform it was built for. We should create a marker in cordova.js, near the top, making it real obvious what platform it's for. Should also be machine readable. Perhaps there's no way to do make the platform check, in one single portable way, across platforms. Every platform may have to do the best they can. Maybe checking user agent on some particular platform actually makes sense (BUT I DOUBT IT!). eg, for iOS, if we did as I suggest in the 1st paragraph, we could easily check this in an Xcode build step in our template, and (I assume) force a build failure. And once we have the "command line tooling", maybe we can check there also. -- Patrick Mueller http://muellerware.org
