react-native-multiple-image-picker icon indicating copy to clipboard operation
react-native-multiple-image-picker copied to clipboard

Error 163 duplicate symbols for architecture x86_64 on IOS

Open minhpd911992 opened this issue 2 years ago • 7 comments

When i upgrade version 1.1.6 and run project ios. It has an error: 163 duplicate symbols for architecture x86_64 Linker command failed with exit code 1 (use -v to see invocation)

If i use version 0.4.9, it hasn't error My mac: Apple M1 Pro 16GB, Xcode 15, react native version 0.72.4

Please help me !

minhpd911992 avatar Oct 26 '23 02:10 minhpd911992

Same problem here!

marcos-vinicius-mafei avatar Oct 31 '23 18:10 marcos-vinicius-mafei

@minhpd911992, have you found a solution for this?

marcos-vinicius-mafei avatar Nov 01 '23 13:11 marcos-vinicius-mafei

@baronha, can you take a look at this? Pls!

marcos-vinicius-mafei avatar Nov 01 '23 13:11 marcos-vinicius-mafei

I use this library in conjunction with another that uses TOCropViewController. This library uses CropViewController, which is a swift wrapper for the TOCropViewController, so it generates a second set of duplicated files.

bizarrecoding avatar Nov 03 '23 02:11 bizarrecoding

I use this library in conjunction with another that uses TOCropViewController. This library uses CropViewController, which is a swift wrapper for the TOCropViewController, so it generates a second set of duplicated files.

Yah sir. This is the right solution for us. If you need to open the Crop View Controller directly, that's in my TODO list:

Screenshot 2023-11-03 at 13 14 45

baronha avatar Nov 03 '23 06:11 baronha

Assuming you use another library using TOCropViewController, you need to patch it to use CropViewController instead. In the other library podspec:

-  s.dependency 'TOCropViewController'
+  s.dependency 'CropViewController'

And within the library code replace any instance of TOCropViewController import:

-#import <TOCropViewController/TOCropViewController.h>
+#import <CropViewController/CropViewController.h>

with that, both libraries use the same dependency and will not generate duplicate files.

bizarrecoding avatar Nov 03 '23 15:11 bizarrecoding

Thank you so much @bizarrecoding! I will try your solution.

marcos-vinicius-mafei avatar Nov 03 '23 16:11 marcos-vinicius-mafei