Hi There!
Not sure what I did wrong but I don't seem to be able to use the package.
Installation went smoothly, my app runs, not problem on import but when I call the openPicker function, it crashes...
Thanks a lot for any help/lead on how to get this to work.
Tell us which versions you are using:
Using QBImagePickerController (2.6.0)
Using RSKImageCropper (1.5.1)
Calling
ImagePicker.openPicker({
multiple: true,
width: 800,
height: 800,
includeBase64: true,
}).then((images) => {
console.log(images);
});
should open the picker.
App crashes on iOs with error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QBImagePickerController setMediaType:]: unrecognized selector sent to instance xxxxxxxx'
*** First throw call stack:
(
0 CoreFoundation 0x0344d494 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0238ee02 objc_exception_throw + 50
2 CoreFoundation 0x03457253 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0338c89d ___forwarding___ + 1037
4 CoreFoundation 0x0338c46e _CF_forwarding_prep_0 + 14
5 HeyNeighburz 0x002a0eb8 __48-[ImageCropPicker openPicker:resolver:rejecter:]_block_invoke_2 + 2376
6 libdispatch.dylib 0x050d5363 _dispatch_call_block_and_release + 15
7 libdispatch.dylib 0x050f89cd _dispatch_client_callout + 14
8 libdispatch.dylib 0x050ddf7c _dispatch_main_queue_callback_4CF + 910
9 CoreFoundation 0x033971be __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
10 CoreFoundation 0x03355434 __CFRunLoopRun + 2356
11 CoreFoundation 0x03354846 CFRunLoopRunSpecific + 470
12 CoreFoundation 0x0335465b CFRunLoopRunInMode + 123
13 GraphicsServices 0x0686e664 GSEventRunModal + 192
14 GraphicsServices 0x0686e4a1 GSEventRun + 104
15 UIKit 0x00a12eb9 UIApplicationMain + 160
16 MyProject 0x00069a4a main + 138
17 libdyld.dylib 0x05122a25 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
It might be linked to the fact that I also use https://github.com/marcshilling/react-native-image-picker in the project?
for some reason coocapods decided to use older version. Do you have platform :ios, '8.0' in your Podfile? You should use QBImagePickerController version 3.4.0
Deleted the Podfile.lock and reinstalled pods and it works. Thanks!
Most helpful comment
Deleted the Podfile.lock and reinstalled pods and it works. Thanks!