Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-1978

Cordova 2.2 iOS does not work with RequireJS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.0, 2.2.0
    • Master
    • cordova-ios
    • None
    • Use RequireJS to loading cordova.js
      http://requirejs.org/

    Description

      Cordova does not fire `deviceready` when using RequireJS to loading cordova.js
      Because, cordova-ios accesses `window.cordova` object at `webViewDidFinishLoad`
      However, window.cordova is undefined. It occurs JavaScript error.

      I create monkey patch for my project.
      it works for me.
      https://gist.github.com/4159669

      So, cordova-2.1.0 has same problem.
      My monkey patch is here.
      https://gist.github.com/3824310

      Attachments

        1. www.tar.gz
          19 kB
          Frederico Costa Galvão

        Activity

          People

            agrieve Andrew Grieve
            yonekawa Kenichi Yonekawa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: