Tell us which versions you are using:
Tell us to which platform this issue is related
Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'equesteo' do
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/Messaging'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'Mixpanel'
# from https://github.com/ivpusic/react-native-image-crop-picker
rn_path = '../node_modules/react-native'
pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
# from https://github.com/oblador/react-native-vector-icons
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'Core',
'CxxBridge',
'DevSupport',
'RCTActionSheet', #
'RCTAnimation', #
'RCTBlob', #
'RCTCameraRoll', #
'RCTGeolocation', #
'RCTImage', #
'RCTLinkingIOS', #
'RCTNetwork', #
'RCTPushNotification', #
'RCTSettings', #
'RCTText', #
'RCTVibration', #
'RCTWebSocket', #
'RCTLinkingIOS' #
]
pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'
# React Native third party dependencies podspecs
pod 'DoubleConversion', :podspec => "#{rn_path}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{rn_path}/third-party-podspecs/glog.podspec"
pod 'react-native-camera', :path => '../node_modules/react-native-camera'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
I call:
createPhoto() {
ImagePicker.openPicker({
width: 1080,
height: 1080,
}).then(image => {
alert('then')
this.props.createPhoto(image.path)
}).catch((e) => {
alert('catch')
logDebug('broke', 'broke')
})
}
and it runs, or the catch block gets called
On Android, works fine. On iPhone, nothing.
1.
2.
3.
No errors are thrown or anything is logged in the console. Just, nothing happens.
I have uninstalled and reinstalled a dozen times. I don't know iOS, really, but I'm trying to step through that code. It gets called, it does all the things I would expect, but the QBImagePicker never shows up on the screen, and the promise never resolves or rejects.
So many hours later, figured it out! I'm using react-native-navigation, and migrated from v1 to v2 at some point. There were lines left over in AppDelegate.m that I didn't remove.
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
Took those out and whammo, works.
glad to hear you figured it out
Most helpful comment
So many hours later, figured it out! I'm using react-native-navigation, and migrated from v1 to v2 at some point. There were lines left over in AppDelegate.m that I didn't remove.
Took those out and whammo, works.