Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-21780

Cordova projects exported as native projects fails to run in iOS simulator under XCode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.1.CR1
    • 4.3.1.Beta2
    • aerogear-hybrid
    • None
    • devex #4 March 2016
    • 1
    • Hide

      1. Import the provided project (https://github.com/VineetReynolds/cordova-test/tree/master/demo) into JBDS. Or create a new Cordova project, and add the Cordova Device plugin.
      2. Export the project as a native iOS project.
      3. Open the generated project in XCode.
      4. Run the project in an iOS simulator.
      5. The application should be deployed on the simulator, but it fail to start and display a "Connecting to device" message. It should instead show a "Device is Ready" message.

      Show
      1. Import the provided project ( https://github.com/VineetReynolds/cordova-test/tree/master/demo ) into JBDS. Or create a new Cordova project, and add the Cordova Device plugin. 2. Export the project as a native iOS project. 3. Open the generated project in XCode. 4. Run the project in an iOS simulator. 5. The application should be deployed on the simulator, but it fail to start and display a "Connecting to device" message. It should instead show a "Device is Ready" message.

      Cordova projects with Cordova plugins when exported as native projects appear to have incorrect locations set for config.xml.

      A new config.xml appears to be created with default content and none of the Cordova plugins in the configuration, which is incorrect. In addition, the original config.xml file is created/copied into the www/ directory, which is ignored by the build and/or runtime.

      When the native project is run in the iOS simulator, it shows errors/warnings that indicate failure in initialising Cordova. Plugins like the Device plugin are not loaded since they cannot be found in the config.xml (assuming the newly created config is overridding the original config), resulting in a failed application start.

      The output window shows the following message:

      ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.

            gercan@redhat.com Gorkem Ercan
            vineet.reynolds_jira Vineet Reynolds (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: