cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JoseExposito <>
Subject [GitHub] cordova-plugin-camera pull request #290: [osx platform] Added macOS support
Date Tue, 10 Oct 2017 16:14:41 GMT
GitHub user JoseExposito opened a pull request:

    [osx platform] Added macOS support

    HI all,
    This pull request adds macOS support to cordova-plugin-camera.
    I'm not sure if this project accepts new features, is open to community collaborations
or even if I should be submitting this PR to Some guidance will be truly
appreciated 😄 
    Here is a little demo of how it works:
    The JS code looks like:
    document.querySelector('#testCamera').addEventListener('click', function() {, onError, {
            sourceType: Camera.PictureSourceType.CAMERA,
            destinationType: Camera.DestinationType.DATA_URL,
            allowEdit: true,
            encodingType: Camera.EncodingType.JPEG,
            quality: 100,
            targetWidth:  500,
            targetHeight: 100,
    document.querySelector('#testFile').addEventListener('click', function() {, onError, {
            sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
            destinationType: Camera.DestinationType.FILE_URI,
            encodingType: Camera.EncodingType.PNG,
            mediaType: Camera.MediaType.ALLMEDIA,
            targetWidth:  500,
            targetHeight: 100,
    As you can see it support image scale, PNG, JPEG, quality... 
    I'm interested in collaborating to migrate more plugins to macOS, but first I wanted to
contact with the team to know if:
    (1) The Cordova team is interested in supporting macOS and/or other desktop platforms
    (2) I need to introduce any further changes in this pull request
    (3) You are open to migrate all the other core plugins to macOS
    (4) You are interested in supporting multi window in desktop platforms
    Known issues: When adding the plugin to a project:
    $ cordova plugin add
    It is necessary to open `platforms/osx/HelloCordova.xcodeproj` and manually add the plugin
to `platforms/osx/HelloCordova/config.xml`:
    <?xml version='1.0' encoding='utf-8'?>
    <widget id="io.cordova.hellocordova" version="1.0.0" xmlns=""
        <feature name="Camera">
            <param name="osx-package" value="CDVCamera" />
    I noticed this happens with other Cordova core plugins with official macOS support like
`cordova-plugin-device` or `cordova-plugin-file`.
    I guess this is an issue with the osx platform. Could somebody help me to report this
issue to the right project/maintainer?

You can merge this pull request into a Git repository by running:

    $ git pull master

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #290



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message