react-native-image-crop-picker: To use CocoaPod,Then Archive My App It tell me: 'RSKImageCropper/RSKImageCropper.h' file not found

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.12.1
  • react-native v0.37.0

Platform

Tell us to which platform this issue is related

  • iOS

Expected behaviour

Success Archive

Actual behaviour

Have a issue : ‘RSKImageCropper/RSKImageCropper.h’ file not found

Steps to reproduce

1.add pod file

# Uncomment the next line to define a global platform for your project
platform :ios, ‘8.0’

target 'together' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  #react-native-image-crop-picker
  pod 'RSKImageCropper' , '1.5.2'
  pod 'QBImagePickerController' , '3.4.0'
  
  # Pods for together

  target 'togetherTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

2.react-native link react-native-image-crop-picker (because react-native-image-crop-picker is already in my project)

  1. coding in my RN .js

  2. in xcode : product -> scheme -> edit scheme select archive to change “build configuaration” to release product -> archive

Attachments

// stacktrace or any other useful debug info xxx/node_modules/react-native-image-crop-picker/ios/ImageCropPicker.h:15:9: ‘RSKImageCropper/RSKImageCropper.h’ file not found

wx20170208-211441 wx20170208-211509

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 26 (3 by maintainers)

Most upvoted comments

I think this should be reopened, I seem to be facing the same issue (and so are others from the looks of it). There doesn’t seem to be a good cocoapods approach, npm install && pod install didn’t work in my case.

I re-ran pod install and that fixed it for me.

This error is extremely random. I will do 10 fastlane builds in a row with no problem, but on the 11th one, suddenly I get the error.

The same with xcode builds - It will work fine for a number of builds in a row, and then randomly suddenly it throws the error.

@CCYQ1995 This still does not solve the problem 100% of the time

@ranpaco I copy all of the react-native-image-crop-picker source file to my project (include .m & .h) And then cocoapod RSKImageCropper and QBImagePickerController to my project unlink react-native-image-crop-picker library link photos.framework library It works! I know this is not the best way, but is the most simple way to solve this question.

Please keep open this issue until it have perfect solution.Thank you~

if use xcodebuild, or build on CI server, it will still randomly fail, annoying 👎

▸ Compiling UIImage+Resize.m

❌  /.../node_modules/react-native-image-crop-picker/ios/ImageCropPicker.h:26:9: 'RSKImageCropper/RSKImageCropper.h' file not found

#import <RSKImageCropper/RSKImageCropper.h>
^


▸ Compiling UIImage+Resize.m

❌  /.../node_modules/react-native-image-crop-picker/ios/ImageCropPicker.h:26:9: 'RSKImageCropper/RSKImageCropper.h' file not found

#import <RSKImageCropper/RSKImageCropper.h>
        ^


** ARCHIVE FAILED **

This error is extremely random when I build or Archive,I use cocoapods,I resolve it by: 1.react-native unlink react-native-image-crop-picker 2.npm uninstall react-native-image-crop-picker —save 3.remove pod ‘RSKImageCropper’ pod ‘QBImagePickerController’ in podfile and pod install 4.install react-native-image-crop-picker again by readMe 5.clean xcode and build

Yeah ,Yesterday I update my project , run npm install && pod install .It fixed. Thanks everyone.

@L-Jovi Yeah , I checked Copy if needed and Create groups .