React-native-image-crop-picker: iOS App crashes when on open.

Created on 2 May 2017  路  12Comments  路  Source: ivpusic/react-native-image-crop-picker

Hi,
i used the [email protected] it was working fine, but with the latest version iam facing some issue.

Version

-react-native-cli: 2.0.1
-react-native: 0.44.0

Platform

  • iOS

Steps followed to install

  • npm i react-native-image-crop-picker --save
  • react-native link react-native-image-crop-picker
  • Drag and drop the ios/ImageCropPickerSDK folder to your xcode project. (Copy items if needed IS ticked)
  • RSKImageCropper.framework and QBImagePicker.framework added in Embedded Binaries
  • NSPhotoLibraryUsageDescription with description is added in info.plist

Issue that iam facing is
when i run react-native run-ios , it gives me build succeeded in terminal and app installs in simulator, but app crashes on opening the app ,if i remove RSKImageCropper.framework, QBImagePicker.framework and libimageCropPicker.a from Embedded Binaries the app builds and runs as expected(i.e opening idex.ios.js default source).i didn't imported react-native-image-crop-picker in my javascript file

Attachments

screen shot 2017-05-02 at 3 03 17 pm

Most helpful comment

it works now

I used the solution of @aravindhrbt
then I used the solution of @clovs from her
https://github.com/ivpusic/react-native-image-crop-picker/issues/253

maybe the solution of @clovs work alone . not tryed

All 12 comments

I highly recommend to use cocapods for dependency management. After that, you won't run into these issues.

@ivpusic i followed cocapods installation with pod 'RSKImageCropper' and pod 'QBImagePickerController' and i built my application if try to use ImagePicker.openPicker({ width: 200, height: 200, cropping: true, cropperCircleOverlay: true, }).then(image => { this.setState({ avatarSource: {uri: image.path, width: image.width, height: image.height, mime: image.mime}, }); }).catch(e => { alert(e); });

import { AppRegistry, StyleSheet, Text, View, Image, TouchableOpacity, NativeModules } from 'react-native'; var ImagePicker = NativeModules.ImageCropPicker;
iam getting undefined error, can You help in this please.
simulator screen shot 02-may-2017 7 08 38 pm

you have to run react-native link react-native-image-crop-picker as well.

have you installed it first? npm install react-native-image-crop-picker?

@ivpusic

Sorry it was my mistake, i removed npm form node_modules

This steps works for me

  • npm i react-native-image-crop-picker --save
  • react-native link react-native-image-crop-picker
  • cd ios/
  • pod init
  • Add platform :ios, '8.0' to Podfile (!important)
  • Add pod 'RSKImageCropper' and pod 'QBImagePickerController' to Podfile
  • pod install
  • then react-native run-ios
  • it Works

Thanks @ivpusic 馃挴 it works as expected.

pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'RCTText',
'RCTNetwork',
'RCTWebSocket', # needed for debugging
'RCTAnimation',
'RCTImage',
'RCTNetwork',
'RCTGeolocation',
'RCTActionSheet',
'RCTVibration',
'RCTLinkingIOS',
'RCTPushNotification',
'RCTCameraRoll'
# Add any other subspecs you want to use in your project
]

My approach is to add dependency purely with cocoapods including React, thus, I no need to run react-native link react-native-image-crop-picker anymore.
However, the podspec cannot get Xcode to build successfully.

I guess it is because all dependencies are frameworks.
'RCTBridgeModule.h' file not found issue exists.

Any solution? @ivpusic

@aravindhrbt
i removed all my node modules folder and tryed your steps ( i didn't do the steps with xcode as described in the install part )

now i have an error will building and deploying on iphone

dyld__abort_with_payload:
    0x1006da8b4 <+0>:  mov    x16, #0x209
    0x1006da8b8 <+4>:  svc    #0x80
->  0x1006da8bc <+8>:  b.lo   0x1006da8d4               ; <+32>       THREAD 1 signal SIGABRT 
    0x1006da8c0 <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1006da8c4 <+16>: mov    x29, sp
    0x1006da8c8 <+20>: bl     0x1006da100               ; cerror_nocancel
    0x1006da8cc <+24>: mov    sp, x29
    0x1006da8d0 <+28>: ldp    x29, x30, [sp], #0x10
    0x1006da8d4 <+32>: ret

i tryed 3 times but fale each time. any idea ?

it works now

I used the solution of @aravindhrbt
then I used the solution of @clovs from her
https://github.com/ivpusic/react-native-image-crop-picker/issues/253

maybe the solution of @clovs work alone . not tryed

@ivpusic

you have to run react-native link react-native-image-crop-picker as well.

I have to use pod install to do all things what react-native link xxxx do, because we are integrating RN project with another Unity project.

Any solution for me?

thanks.

@ivpusic
For react-native link step, is the Manual linking steps on page http://facebook.github.io/react-native/docs/linking-libraries-ios.html enough?

thanks.

yes

@ivpusic
Eeeee, after Manual linking steps, I got the error React/RCTDefines.h not found, similar as #371

And add $(SRCROOT)/../../../../Pods/Headers/Public or "${PODS_ROOT}/Headers/Public" to the Headers search path are not working.

The last solution in my opinion, I build a podspec file like #454, pod install successful, but other errors on build failed.

It looks like we really need someone supply a podspec file for only pod install guys.

Any suggest? Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xuchao321 picture xuchao321  路  3Comments

fmcruz picture fmcruz  路  3Comments

equesteo picture equesteo  路  3Comments

tximpa91 picture tximpa91  路  3Comments

cwRichardKim picture cwRichardKim  路  3Comments