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)
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:
Clean
andClean Folder...
DerivedData
folder of the related project (in<user>/Library/Developer/Xcode/DerivedData
)react-native unlink react-native-image-crop-picker
<project folder>/ios
remove thePods
folder and the pod lock file<project folder>
remove thenome_modules
folder and theyarn.lock
filesudo yarn
<project folder>/ios
and run a pod installreact-native link react-native-image-crop-picker
Hope this helps, cheers.
I’m using cocoapods. I got this issue, then I closed xcode then re-opened it and it worked.