shijingsh / react-native-customized-image-picker

iOS/Android image picker with support for camera, video compression, multiple images and cropping
245 stars 59 forks source link

ios 不支持打开相机 #6

Closed supei328 closed 6 years ago

liukefu2050 commented 7 years ago

Post-install steps

iOS

In Xcode open Info.plist and add string key NSPhotoLibraryUsageDescription with value that describes why do you need access to user photos. More info here https://forums.developer.apple.com/thread/62229. Depending on what features you use, you also may need NSCameraUsageDescription and NSMicrophoneUsageDescription keys.

cocoapods users

Add platform :ios, '8.0' to Podfile (!important) Add pod 'RSKImageCropper' and pod 'QBImagePickerController' to Podfile non-cocoapods users

Drag and drop the ios/ImageCropPickerSDK folder to your xcode project. (Make sure Copy items if needed IS ticked) Click on project General tab Under Deployment Info set Deployment Target to 8.0 Under Embedded Binaries click + and add RSKImageCropper.framework and QBImagePicker.framework

liukefu2050 commented 7 years ago

需要增加权限

liukefu2050 commented 6 years ago

like this ImagePicker.openCamera({ width: 300, height: 400, cropping: true }).then(image => { console.log(image); });