You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Filip Maj (Created) (JIRA)" <ji...@apache.org> on 2012/03/26 20:20:28 UTC

[jira] [Created] (CB-385) Implement checking of platform + version in cordova-js to values returned in native device information

Implement checking of platform + version in cordova-js to values returned in native device information
------------------------------------------------------------------------------------------------------

                 Key: CB-385
                 URL: https://issues.apache.org/jira/browse/CB-385
             Project: Apache Callback
          Issue Type: New Feature
          Components: CordovaJS
    Affects Versions: 1.5.0
            Reporter: Filip Maj
            Assignee: Filip Maj
             Fix For: 1.7.0


There still exists a lot of confusion regarding utilizing the wrong .js file for a given platform. Many people still think that the cordova.js file can be reused across platforms.

We should implement a check in cordova-js, comparing with some tokens that get replaced in the JS at build-time, that verify the version and platform that the .js file is built for matches what the native framework returns. IF it doesn't we can alert the user of the issue and hopefully avoid a lot of headache for users who are unaware.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-385) Implement checking of platform + version in cordova-js to values returned in native device information

Posted by "Filip Maj (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj updated CB-385:
-------------------------

    Affects Version/s: 1.7.0
                       1.6.1
                       1.6.0
        Fix Version/s:     (was: 1.7.0)
                       1.8.0

Moved to 1.8.0: making sure 1.7.0 is a bug fix and docs polish release, not a new feature release.
                
> Implement checking of platform + version in cordova-js to values returned in native device information
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-385
>                 URL: https://issues.apache.org/jira/browse/CB-385
>             Project: Apache Callback
>          Issue Type: New Feature
>          Components: CordovaJS
>    Affects Versions: 1.5.0, 1.6.0, 1.6.1, 1.7.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.8.0
>
>
> There still exists a lot of confusion regarding utilizing the wrong .js file for a given platform. Many people still think that the cordova.js file can be reused across platforms.
> We should implement a check in cordova-js, comparing with some tokens that get replaced in the JS at build-time, that verify the version and platform that the .js file is built for matches what the native framework returns. IF it doesn't we can alert the user of the issue and hopefully avoid a lot of headache for users who are unaware.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-385) Implement checking of platform + version in cordova-js to values returned in native device information

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj updated CB-385:
-------------------------

         Priority: Minor  (was: Major)
    Fix Version/s:     (was: 1.8.0)

Removing a fix version for this issue and dropping priority. Still need a bunch of investigation/research to see if/how this is doable.
                
> Implement checking of platform + version in cordova-js to values returned in native device information
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-385
>                 URL: https://issues.apache.org/jira/browse/CB-385
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: CordovaJS
>    Affects Versions: 1.5.0, 1.6.0, 1.6.1, 1.7.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>            Priority: Minor
>
> There still exists a lot of confusion regarding utilizing the wrong .js file for a given platform. Many people still think that the cordova.js file can be reused across platforms.
> We should implement a check in cordova-js, comparing with some tokens that get replaced in the JS at build-time, that verify the version and platform that the .js file is built for matches what the native framework returns. IF it doesn't we can alert the user of the issue and hopefully avoid a lot of headache for users who are unaware.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-385) Implement checking of platform + version in cordova-js to values returned in native device information

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266969#comment-13266969 ] 

Filip Maj commented on CB-385:
------------------------------

One avenue for a solution for this issue is to check the values of the device module's {{platform}} and {{cordova}} properties and compare against the platform module's {{id}} property (inside the platform.js file), and perhaps another token that we inject with the contents of the VERSION file at build-time. This, however, relies on the bridge working (since we need the device info to come back), which may (and probably will) not work if the wrong cordova.js file is used.

Anyone have thoughts on that?
                
> Implement checking of platform + version in cordova-js to values returned in native device information
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-385
>                 URL: https://issues.apache.org/jira/browse/CB-385
>             Project: Apache Callback
>          Issue Type: New Feature
>          Components: CordovaJS
>    Affects Versions: 1.5.0, 1.6.0, 1.6.1, 1.7.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.8.0
>
>
> There still exists a lot of confusion regarding utilizing the wrong .js file for a given platform. Many people still think that the cordova.js file can be reused across platforms.
> We should implement a check in cordova-js, comparing with some tokens that get replaced in the JS at build-time, that verify the version and platform that the .js file is built for matches what the native framework returns. IF it doesn't we can alert the user of the issue and hopefully avoid a lot of headache for users who are unaware.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-385) Implement checking of platform + version in cordova-js to values returned in native device information

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270858#comment-13270858 ] 

Filip Maj commented on CB-385:
------------------------------

Going to investigate:

 - adding a marker near the top (comment for users, and some token in the platform defn file)
 - try to compare against user agent string (shudder).
                
> Implement checking of platform + version in cordova-js to values returned in native device information
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-385
>                 URL: https://issues.apache.org/jira/browse/CB-385
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: CordovaJS
>    Affects Versions: 1.5.0, 1.6.0, 1.6.1, 1.7.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.8.0
>
>
> There still exists a lot of confusion regarding utilizing the wrong .js file for a given platform. Many people still think that the cordova.js file can be reused across platforms.
> We should implement a check in cordova-js, comparing with some tokens that get replaced in the JS at build-time, that verify the version and platform that the .js file is built for matches what the native framework returns. IF it doesn't we can alert the user of the issue and hopefully avoid a lot of headache for users who are unaware.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira