Open amitbravo opened 4 years ago
hmmm i may be experiencing something similar. I have existing projects that all work fine however for a new project created with Xcode 11.2 i get this issue. Wondering if its related to all the new Application Scene Manifest stuff in info.plist and the new iOS 13 methods in AppDelegate under UISceneSession lifecycle that get scaffolded in with a new project.
Looking more at the error: [GUL_AppDelegate-87E382F8-4D6E-4BA5-8909-BC2B4AD3061D window]: unrecognized selector sent to instance
Is the library calling a method on window that no longer exists?
Happens on ImageCropPicker.openCamera({ and ImageCropPicker.openPicker({
Update: got it going with... AppDelegate.h add a missing @property (strong, nonatomic) UIWindow *window;
AppDelegate.m Comment out all the UISceneSession lifecycle events relating to UISceneConfiguration and UISceneSession
Info.plist Delete the property dictionary: Application Scene Manifest
Those actions should revert the project to support pre iOS 13. With the new version they do away with window and its all about Scene. Performing above makes the project backwards compatible hence why my old projects remained functional.
At some stage the getRootVC method in ImageCropPicker.m will need to be updated to support this new way of obtaining the rootViewController.
Hey @amitbravo did solution provided by @devpascoe solve your problem and you are still using this library? Or you come up with something else? Thanks
Tried the solution suggested by @devpascoe, no luck whatsoever
Same error:
-[NSNull length]: unrecognized selector sent to instance 0x1f6ed7c00 ** Terminating app due to uncaught exception 'NSInvalidArgumentException'
Just curios if any developers have got a resolution for this long-standing issue
Version
Tell us which versions you are using:
Platform
Tell us to which platform this issue is related
Actual behaviour
"libc++abi.dylib: terminating with uncaught exception of type NSException"
Steps to reproduce
yarn add react-native-image-crop-picker
cd ios && pod install
pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'
added NSPhotoLibraryUsageDescription NSMicrophoneUsageDescription NSCameraUsageDescription into info.plist
react-native run-ios
after these as it didn't work, I tried to use react-native link react-native-image-crop-picker cleaned, ios build, erase from simulator, nothing worked.
Podfile content:
latform :ios, '9.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'xycabs' do
Pods for xcabs
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../node_modules/react-native/' pod 'React-Core', :path => '../node_modules/react-native/' pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'Firebase/Core', '~> 6.3.0' pod 'Firebase/Auth', '~> 6.3.0' pod 'Firebase/Messaging', '~> 6.3.0' pod 'Firebase/Storage', '~> 6.3.0' pod 'Firebase/Firestore', '~> 6.3.0'
pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'
target 'xycabsTests' do inherit! :search_paths
Pods for testing
end
use_native_modules! end