React-native-image-crop-picker: RSKImageCropper Redefinition of module cause by bug in Xcode 8.3

Created on 31 Mar 2017  路  13Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.9.6
  • react-native v0.39.5

Platform

Tell us to which platform this issue is related

  • iOS

Expected behaviour

build pass

Actual behaviour

build fail with error
ios/RSKImageCropper/RSKImageCropper/module.modulemap:1:18: Redefinition of module 'RSKImageCropper'

Steps to reproduce

  1. install dependency

  2. try to build

  3. build fail

Attachments

// stacktrace or any other useful debug info

i track this bug to see RSKImageCropper fix this buy 3 day ago
https://github.com/ruslanskorb/RSKImageCropper/pull/139
root cause of this buy are from Xcode 8.3 you can see here
https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html
inKnown Issues in LLVM section

how to fix

i think just update RSKImageCropper dependency
but i never write obj-C or swift before so may be it harder.

Most helpful comment

@booboothefool under your project go to
node_modules/react-native-image-crop-picker/ios/RSKImageCropper/
and change mv module.modulemap RSKImageCropper.modulemap
it should work

All 13 comments

Dude i have the same issue :/

Did that and still have the same issue @eiosca
screen shot 2017-04-01 at 2 39 18 pm

I kinda fix it by following the workaround suggested here:

Known Issues
When building a framework that has module maps in both the source and the install directories that define the same module, the compiler will show a redefinition message. (28638816)
_Workaround_: Rename the module map file in the source directory to a non-default name (the default name is module.modulemap or module.map), and set the Module Map File build setting to the renamed module map.

Also I noticed that while my folders where like this

/Users/johndoe/ReactProjects/myProject/myApp/node_modules/react-native-image-crop-picker/ios/RSKImageCropper/RSKImageCropper/module.modulemap

he was looking for the file in

/Users/johndoe/ReactProjects/myProject/myApp/node_modules/react-native-image-crop-picker/ios/RSKImageCropper/module.modulemap

So when I renamed the file in Build Settings I also added the extra folder, instead of setting only the file name mymodule.modulemap I setted RSKImageCropper/mymodule.modulemap.

Hope this helps

Stupid question but where is the .modulemap defined in the build settings? I am browsing up and and down and I can't find it.

Btw have the same issue :\

RSKImageCropper 1.6.1 works fine for me with Xcode 8.3.1

@kornerr tnx for update

@kornerr i'm having the same issue on xCode version 8.3.1 (8E1000a)

react-native-image-crop-picker/ios/RSKImageCropper/RSKImageCropper/module.modulemap:1:18: error: redefinition of module 'RSKImageCropper'
framework module RSKImageCropper {
                 ^
.../Build/Intermediates/RSKImageCropper.build/Debug-iphonesimulator/RSKImageCropper.build/module.modulemap:1:18: note: previously defined here
framework module RSKImageCropper {
                 ^
1 error generated.

My XCode just did a thing like "XCode needs to install some files to run", so I pressed okay, and now my React Native project which has worked fine for the past 6 months won't build. I'm getting the error mentioned in this post about RSKImageCropper (as well as a lot of other libs having issues). I wasn't sure what XCode I was on beforehand, but I'm on 8.3.2 now. Did it probably just update on me, and I should be good if I downgrade?

@booboothefool under your project go to
node_modules/react-native-image-crop-picker/ios/RSKImageCropper/
and change mv module.modulemap RSKImageCropper.modulemap
it should work

Can anyone tell how can i use RSKImagecropper in swift 3

I updated react-native-image-crop-picker version in package.json to 0.19.1, and relinked with react-native unlink react-native-image-crop-picker; react-native link react-native-image-crop-picker, deleted everything under ios/build and... works now.

Was this page helpful?
0 / 5 - 0 ratings