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

如何在iOS上使用PhoneGap从照片库获取图片?,ios,cordova,ios7,cordova-3,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.PHOTOLI

我正在使用以下代码尝试从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
});

我在iphone5s和phonegap3.3.0上使用ios7(7.0.4)。不管我做什么,它总是把相机调高。我做错了什么?

下面的代码用于access gallery照片:

 Camera.sourceType = Camera.PictureSourceType.PHOTOLIBRARY 

 or

 Camera.PictureSourceType.SAVEDPHOTOALBUM, 
然后显示照片选择器对话框,从中可以选择相册中的照片。

我想我找到了它:

soureType: Camera.PictureSourceType.PHOTOLIBRARY,
应该是:

sourceType: Camera.PictureSourceType.PHOTOLIBRARY,

sourceType中有一个输入错误。也许就是这样?

那也不行。这与在getPicture()的cameraOptions参数中设置sourceType有何不同?您使用的是phonegap构建还是本地客户端?本地客户端。我正在终端中运行“phonegap build ios”,然后在Xcode中点击“Run”在我的手机上运行。你也安装了摄像头插件吗?是的。我可以拍得很好。我只是不能让它允许我从现有的照片中进行选择。我将不得不等到我回家检查这个。如果这是问题所在,我将提名自己参加“OhmygodicantBelievedThat”奖。当StackOverflow允许我在4小时内交付时,请享受您应得的赏金。:)