1 Reply Latest reply on Nov 16, 2017 5:39 PM by gdex

    iOS  navigator.camera.getPicture() not working with Camera

    gdex Level 1

      The navigator.camera.getPicture() no longer works when PictureSourceType.CAMERA is set in the options object. The call works when PictureSourceType.PHOTOLIBRARY is selected.


      Here is what I am seeing:

      1. navigator.camera.getPicture(success, fail, options); is called with PictureSourceType.CAMERA
      2. The Camera is opened and the user can take a picture. User is asked for permissions etc. (if not already given) like usual.
      3. User taps Use Photo.
      4. The Camera closes and Nothing...
      5. The success callback is never called and the failed callback is sometimes reached 30 to 40 seconds after the camera closes.


      All of my builds after November 8th have this issue.


      PhoneGap (iOS / Android / Windows) cli-6.5.0 (4.3.1 / 6.1.2 / 4.4.3)


      My config.xml as follows:

      NOTE: I have tried with the older version of cordova-plugin-camera 2.4.1.


      <widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">

        <preference name="CameraUsesGeolocation" value="true" />

        <preference name="detect-data-types" value="false" />

        <preference name="android-windowSoftInputMode" value="adjustPan" />

        <preference name="StatusBarOverlaysWebView" value="false" />

        <preference name="StatusBarBackgroundColor" value="#000000" />

        <preference name="ShowSplashScreenSpinner" value="true" />

        <preference name="iosPersistentFileLocation" value="Compatibility" />

        <access origin="*.rkk.com" />

        <access origin="*.rkkengineers.com" />

        <access origin="*.sharepoint.com" />

        <access origin="*.microsoftonline.com" />

        <access origin="itms-services:*" />

        <plugin name="cordova-plugin-camera"/>

        <plugin name="cordova-plugin-ios-camera-permissions" spec="1.0.3" />

        <plugin name="cordova-plugin-ios-microphone-permissions" spec="1.0.0" />

        <plugin name="cordova-plugin-media-capture" />

        <plugin name="cordova-plugin-console" />

        <plugin name="cordova-plugin-contacts" />

        <plugin name="cordova-plugin-device" />

        <plugin name="cordova-plugin-device-motion" />

        <plugin name="cordova-plugin-device-orientation" />

        <plugin name="cordova-plugin-file" />

        <plugin name="cordova-plugin-file-transfer" />

        <plugin name="cordova-plugin-geolocation" />

        <plugin name="cordova-plugin-inappbrowser"/>

        <plugin name="cordova-plugin-media" />

        <plugin name="cordova-plugin-keyboard" />

        <plugin name="cordova-plugin-network-information" />

        <plugin name="cordova-plugin-dialogs" />

        <plugin name="cordova-plugin-splashscreen" onload="true" />

        <plugin name="cordova-plugin-statusbar" version="2.1.0" source="npm" onload="true" />

        <plugin name="cordova-plugin-sqlite-2" source="npm" />

        <plugin name="cordova-plugin-ios-longpress-fix" version="1.1.0" source="npm" />

        <plugin name="cordova-plugin-imagepicker"></plugin>

        <preference name="FadeSplashScreen" value="false" />

        <preference name="ShowSplashScreenSpinner" value="false" />

        <edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">

          <string>CCMS needs Camera access to take pictures.</string>


        <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">

          <string>CCMS needs Photo Library access.</string>


        <edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">

          <string>CCMS needs GPS Location access.</string>


        <edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">

          <string>CCMS needs Photo Library access to save pictures.</string>




      Message was edited by: Greg Dexter