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

Cordova 2.2 iOS does not work with RequireJS

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.0, 2.2.0
    • Fix Version/s: Master
    • Component/s: cordova-ios
    • Labels:
      None
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: