My application fails on start.
In XCode i have this error:
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
and this:
Cannot snapshot view (<UIKeyboardImpl: 0x131e03430; frame = (0 0; 375 216); layer = <CALayer: 0x17403a9e0>>) with afterScreenUpdates:NO, because the view is not in a window. Use afterScreenUpdates:YES.
can you give me more details and code example?
I run application via Xcode (v8.3.3). After that I do some interactions (e.g. selecting & cropping avatar for profile). Then I tap 2 times on home button and swap app to quit and after that I see this error.
RSKImageCropper & QBImagePickerController are installed via pods
Code is like this:
```
changePhoto() {
ImagePicker.openPicker({
width: 300,
height: 300,
includeBase64: true,
cropperCircleOverlay: true,
mediaType: 'photo',
cropping: true
}).then(image => {
this.changeData('avatar', 'data:' + image.mime + ';base64,' + image.data)
this.setState({ isAvatarChanged: true })
}).finally(() => ImagePicker.clean())
}
maybe you need to add like this,
react native link can't auto add this
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
cocoapods users ----
Add platform :ios, '8.0' to Podfile (!important)
Add pod 'RSKImageCropper' and pod 'QBImagePickerController' to Podfile
I did this.
Same here.
Same here.
Same here.
Same here.
for me this lib works well when i run my app from xcode; but if i stop xcode and run my app directly on my simulator, and it crashed
@MrPluto yeap same issue here. Have you found a solution?
if i run the app from XCode it works, if i launch react-native run-ios it crashes immediately after launch
same here.
The same, even if I went through those processes of cocoapods.
Same here.
@ivpusic if launch react-native run-ios it crashes immediately after launch
same here, i'm using cocoa pods, if i run in xcode, all is ok, but if i launch react-native run-ios it crashes immediately on start app.
exact same here with the following:
Environment:
OS: macOS High Sierra 10.13.3
Node: 8.9.4
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.2 => 0.54.2
Any solution for this crash?
Exactly the same issue. I've linked a library. When I run app from XCode - all fine. If I close it and open again, or simply run via react-native run-ios it launches, shows splash screen for ~5 seconds and closes.
Can it be debugged somehow? Because in this case XCode not showing anything
I was having a similar issue, my app was crashing right-after splash screen loads. Then I found a solution that we need to add two Framework RSKImageCropper.frameworkiOS & QBImagePicker.frameworkiOS in Embedded Binaries.
I found a solution from here.
@kantharia Confirm. This solution really works. Thank you 馃榾
pod install has no problem for me
There's a step on README
https://github.com/ivpusic/react-native-image-crop-picker#only-if-you-are-not-using-cocoapods
Problem solved! Thanks a lot!
check the gallery and camera permissions
Most helpful comment
I was having a similar issue, my app was crashing right-after splash screen loads. Then I found a solution that we need to add two Framework
RSKImageCropper.frameworkiOS&QBImagePicker.frameworkiOSinEmbedded Binaries.I found a solution from here.