Closed adamhari closed 5 years ago
I think ImageEditor now is a built-in component. You can simply import ImageEditor from react https://facebook.github.io/react-native/docs/imageeditor
e.g
import { ImageEditor } from 'react-native'
@kevincantstop It is, but it's going to be removed soon. This library should be used as a replacement.
@adamhari Do you still have an issue?
@Trancever I yarn add this repo and the issue still exists
@adamhari Do you still have an issue?
yes
Also there's another problem on iOS, if I call ImageEditor.cropImage, it says:
no such file or directory, open 'rct-image-store//0'
so it causes cropping process failure. I have already added perms to plist.
`
`
I'm new to iOS, any suggestions could help. :) Thanks in advance.
react-native: 0.60.3
@kevincantstop I am pretty sure you're using v1 of image-editor. Can you try v2.0.1 ? We no longer use image-store under the hood.
For me the following patch works.
diff --git a/node_modules/@react-native-community/image-editor/ios/RNCImageEditor.xcodeproj/project.pbxproj b/node_modules/@react-native-community/image-editor/ios/RNCImageEditor.xcodeproj/project.pbxproj
index 9e121f3..8336d35 100755
--- a/node_modules/@react-native-community/image-editor/ios/RNCImageEditor.xcodeproj/project.pbxproj
+++ b/node_modules/@react-native-community/image-editor/ios/RNCImageEditor.xcodeproj/project.pbxproj
@@ -220,6 +220,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../React/**",
"$(SRCROOT)/../../react-native/React/**",
+ "$(SRCROOT)/../../../react-native/Libraries/**",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC";
@@ -236,6 +237,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../React/**",
"$(SRCROOT)/../../react-native/React/**",
+ "$(SRCROOT)/../../../react-native/Libraries/**",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC";
@adamhari Can you provide repo that reproduces issue? I tried same version of React-Native + manual link and it worked fine.
has any one fix this issue ?
@RadiRS If you still experience the issue can you write what version of react-native, image-editor do you use and how do you link them?
@Trancever react-native@0.59.10, react-native-image-editor@2.0.1. Can't provide a reproducible repo at the moment, will try to find time this weekend
I'm getting the same error.
Same here. The lib is linked manually, ie. not using Cocoa Pods. react-native@0.59.9, react-native-image-editor@2.0.1
Edit: fixed by adding the following to RNCImageEditor.xcodeproj
header search paths:
$(SRCROOT)/../../../react-native/Libraries/Image
The fix is included into v2.0.2. Let me know if it works for you!
Bug
Trying to build my project in Xcode after having linked this library. Getting a "'RCTImageUtils.h' file not found" build error.
Environment info
React native info output:
Library version: 2.0.0
Steps To Reproduce
react-native link @react-native-community/image-editor
Describe what you expected to happen:
Notes
I think the problem is that, in RNCImageEditor.m, line 20's if/else is falling back to the else even when RCTImage/RCTImageUitls exists in the project (where RCTImage.xcodeproj is a sibling to RNCImageEditor.xcodeproj)