如何在iOS上使用PhoneGap从照片库中获取图片?

Dar*_*don 7 ios cordova ios7 cordova-3

我正在使用以下代码尝试从iOS照片库中选择一张照片:

navigator.camera.getPicture(this.onCaptureSuccess, this.onCaptureFail, {
    allowEdit: true,
    correctOrientation: true,
    destinationType: Camera.DestinationType.FILE_URI,
    soureType: Camera.PictureSourceType.PHOTOLIBRARY,
    targetHeight: 315,
    targetWidth: 320
});
Run Code Online (Sandbox Code Playgroud)

我在iPhone 5s和PhoneGap 3.3.0上使用iOS 7(7.0.4).无论我做什么,它总是带着相机.我究竟做错了什么?

Daw*_*don 15

想想我找到了:

soureType: Camera.PictureSourceType.PHOTOLIBRARY,
Run Code Online (Sandbox Code Playgroud)

应该:

sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
Run Code Online (Sandbox Code Playgroud)

sourceType中有一个拼写错误.也许就是这样吗?