0

I have tried to load the photos from an example Cordova application. I have copied the full example code from Cordova's website and inserted permission into the config.xml file:

<plugin name="Camera" value="CDVCamera" />
    <feature name="Camera">
        <param name="ios-package" value="CDVCamera" />
    </feature>  
...

I have uploaded a video about my problem: https://www.youtube.com/watch?v=v5sPYVRqIEY

Update: Here is content of cordova_plugins.js file:

cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
    {
        "file": "plugins/org.apache.cordova.console/www/console-via-logger.js",
        "id": "org.apache.cordova.console.console",
        "clobbers": [
            "console"
        ]
    },
    {
        "file": "plugins/org.apache.cordova.console/www/logger.js",
        "id": "org.apache.cordova.console.logger",
        "clobbers": [
            "cordova.logger"
        ]
    },
    {
        "file": "plugins/org.apache.cordova.device/www/device.js",
        "id": "org.apache.cordova.device.device",
        "clobbers": [
            "device"
        ]
    },
    {
        "file": "plugins/org.apache.cordova.camera/www/CameraConstants.js",
        "id": "org.apache.cordova.camera.Camera",
        "clobbers": [
            "Camera"
        ]
    },
    {
        "file": "plugins/org.apache.cordova.camera/www/CameraPopoverOptions.js",
        "id": "org.apache.cordova.camera.CameraPopoverOptions",
        "clobbers": [
            "CameraPopoverOptions"
        ]
    },
    {
        "file": "plugins/org.apache.cordova.camera/www/Camera.js",
        "id": "org.apache.cordova.camera.camera",
        "clobbers": [
            "navigator.camera"
        ]
    },
    {
        "file": "plugins/org.apache.cordova.camera/www/ios/CameraPopoverHandle.js",
        "id": "org.apache.cordova.camera.CameraPopoverHandle",
        "clobbers": [
            "CameraPopoverHandle"
        ]
    }
];
module.exports.metadata = 
// TOP OF METADATA
{
    "org.apache.cordova.console": "0.2.9",
    "org.apache.cordova.device": "0.2.10",
    "org.apache.cordova.camera": "0.3.0"
}
// BOTTOM OF METADATA
});
  • are you really using 2.5 (current version of Cordova is 3.5)? If not, perhaps the sample code doesn't work with current versions. – Lou Franco Jul 31 '14 at 21:09
  • i'm using version 3.5.0 of Cordova. I have tried this code from the 3.5.0: function getPhoto(source) { navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, destinationType: destinationType.FILE_URI, sourceType: source }); } But the result is same...... the 'source' variable's value is pictureSource.PHOTOLIBRARY – user3634216 Jul 31 '14 at 21:51
  • did you configured your plugin in cordova_plugin.js – Mohammed Imran N Aug 01 '14 at 04:34
  • Hmmm.... i just installed the 'Camera' plugin with Cordova. Like this: 'cordova plugin add org.apache.cordova.camera' – user3634216 Aug 01 '14 at 13:25
  • .. Or it isn't enough? – user3634216 Aug 02 '14 at 13:00
  • i found the log of the Safari's javascript-debugger: TypeError: 'undefined' is not an object (evaluating 'navigator.camera.getPicture') – user3634216 Aug 09 '14 at 17:29
  • i found the log of the iOS Simulator's log: Aug 6 23:57:50 MysteryKes-MacBook-Pro.local Masodik[1811] : Resetting plugins due to page load. Aug 6 23:57:50 MysteryKes-MacBook-Pro.local Masodik[1811] : Finished load of: file:///Users/mysteryke/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/E605114B-96D9-443E-801F-8FF1FB4C27D4/Masodik.app/www/index.html Aug 7 00:00:02 MysteryKes-MacBook-Pro.local SpringBoard[1435] : 2014-08-07 00:00:02.809|1435|0xe1bf580: Region monitoring not available or enabled. Trigger ignored! – user3634216 Aug 09 '14 at 17:30
  • You might benefit from: http://stackoverflow.com/questions/21702843/api-phonegap-3-3-0-camera-for-ios-not-working Had a very similar issue, and using 'phonegap local plugin add' seemed to do the trick – Kenny Aug 11 '14 at 20:26

0 Answers0