Ios cordova camera closes the app


#1

In my ionic v1 project, i have used cordova camera plugin for image upload and cordova media capture plugin for video upload.

But both take video and take photo functionality stops working and also when i click on the buttons it closes the app.

But photo or video from gallery works as usual with no fault.

The above issue have occured when i try to fix the keyboard issue. i.e there is no done button in select option and so user not able to select an option in iphone.

To fix this, i have used ionic-plugin-keyboard and added the Keyboard.hideKeyboardAccessoryBar(false). This fixed the issue.

But camera and video suddenly stops working. But no issue in android.

My ionic info,

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 7.1.0
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

Cordova Platforms : none
Ionic Framework   : ionic1 1.3.1

System:

Android SDK Tools : 25.2.5
Node              : v8.11.2
npm               : 6.1.0
OS                : Windows 8.1

My plugins list:

Installing “cordova-pdf-generator” for ios
Installing “cordova-plugin-actionsheet” for ios
Installing “cordova-plugin-camera” for ios
Installing “cordova-plugin-compat” for ios
Installing “cordova-plugin-console” for ios
Plugin doesn’t support this project’s cordova-ios version. cordova-ios: 4.5.4, failed version requirement: <4.5.0
Skipping ‘cordova-plugin-console’ for ios
Installing “cordova-plugin-device” for ios
Installing “cordova-plugin-file” for ios
Installing “cordova-plugin-file-transfer” for ios
Plugin dependency “cordova-plugin-file@6.0.1” already fetched, using that version.
Dependent plugin “cordova-plugin-file” already installed on ios.
Installing “cordova-plugin-filepath” for ios
Installing “cordova-plugin-filepicker” for ios
Running hook to add iCloud entitlements
iosFolder: D:\LiveMobileApp\wasata\platforms\ios
Added iCloud entitlements to project ‘Wasataa’
Installing “cordova-plugin-image-picker” for ios
Installing “cordova-plugin-inappbrowser” for ios
Installing “cordova-plugin-ionic-keyboard” for ios
Installing “cordova-plugin-ionic-webview” for ios
apple-ios version check failed (“D:\LiveMobileApp\wasata\platforms\ios\cordova\apple_ios_version”), continuing anyways.
Installing “cordova-plugin-media” for ios
Plugin dependency “cordova-plugin-file@6.0.1” already fetched, using that version.
Dependent plugin “cordova-plugin-file” already installed on ios.
Installing “cordova-plugin-media-capture” for ios
Plugin dependency “cordova-plugin-file@6.0.1” already fetched, using that version.
Dependent plugin “cordova-plugin-file” already installed on ios.
Installing “cordova-plugin-splashscreen” for ios
Installing “cordova-plugin-statusbar” for ios
Installing “cordova-plugin-whitelist” for ios
Installing “cordova-plugin-x-toast” for ios
Installing “ionic-plugin-keyboard” for ios

app.js

if (window.cordova && window.cordova.plugins.Keyboard) {
  window.cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
  cordova.plugins.Keyboard.disableScroll(false);
}

Please anyone help me to resolve this issue…