react-native-image-crop-picker: iOS build failed with QBImagePicker/QBImagePicker.h file not found

Version

  • react-native-image-crop-picker v0.9.7
  • react-native v0.33.1

Platform

  • iOS

Expected behaviour

Successful build without any modifications.

Actual behaviour

Maybe i missed something, but build failed with

QBImagePicker/QBImagePicker.h file not found. 

When i changed the value of Framework Search Paths for imageCropPicker build target to

$(PROJECT_DIR)/RSKImageCropper/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
$(PROJECT_DIR)/QBImagePicker/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

then i got successful build.

Steps to reproduce

  • npm install react-native-image-crop-picker on empty project
  • react-native link
  • add RSKImageCropper.framework & QBImagePicker.framework both to Embedded Binaries & Linked Frameworks and Libraries
  • add
${PROJECT_DIR}/../node_modules/react-native-image-crop-picker/ios/QBImagePicker/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
${PROJECT_DIR}/../node_modules/react-native-image-crop-picker/ios/RSKImageCropper/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

to Framework Search Paths for react-native project

  • build for simulator or device
  • failure

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (3 by maintainers)

Most upvoted comments

Any updates on such an old issue that still keeps happening every time?

Migrating to cocoapods reveals real problem. It is not with this component but with auto-created schemes in Xcode. If you open Xcode just after installing npm packages and pods - everything will be fine. But if you use xcodebuild without opening Xcode - things goes bad.

Adding ruby script to recreate user schemes just before xcodebuild seems to resolve this problem, but very ugly. No matter, this does not related to this component. Thanks for helping.

i try all methods on internet, but failed. unstare this repo remove react-native-image-crop-picker from my project clear use react-native-image-picker instate

Keeps happening to me too. Today, I did all the procedure I listed above (thanks, past me) but I still got the error. I closed and reopened Xcode, re run the Archive command without doing anything else, and this time it worked. I’m baffled.

Unluckily, this issue keeps resurfacing for me, so for future me and other people that may find this issue (tbh I think @ivpusic you should try to understand why this happens - apparently something breaks after every time I Archive the xcode project)

So, for me to solve this issue the “definitive” list of things to do is:

  1. in XCode, run both Clean and Clean Folder...
  2. close XCode
  3. Remove the DerivedData folder of the related project (in <user>/Library/Developer/Xcode/DerivedData )
  4. from command line, in the project folder, run react-native unlink react-native-image-crop-picker
  5. in <project folder>/ios remove the Pods folder and the pod lock file
  6. in <project folder> remove the nome_modules folder and the yarn.lock file
  7. Empty recycle bin
  8. run sudo yarn
  9. chmod 777 the node_modules folder
  10. go into <project folder>/ios and run a pod install
  11. from command line, in the project folder, run react-native link react-native-image-crop-picker
  12. Open Xcode
  13. Wait for indexing process to be over

Hope this helps, cheers.

I’m using cocoapods. I got this issue, then I closed xcode then re-opened it and it worked.