Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatable together 2 libs #913

Closed
SnaiNeR opened this issue Nov 19, 2020 · 11 comments · Fixed by #1060
Closed

incompatable together 2 libs #913

SnaiNeR opened this issue Nov 19, 2020 · 11 comments · Fixed by #1060
Labels
bug released stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@SnaiNeR
Copy link

SnaiNeR commented Nov 19, 2020

I think it happenes because we have put the same class implementation into two different files
Снимок экрана 2020-11-19 в 21 35 09
Also there a same question https://stackoverflow.com/questions/64856494/2-duplicate-symbols-for-architecture-arm64#

If change react-native-share version from 4.1.0 -> 4.0.4 everything is fine
(https://github.com/react-native-share/react-native-share/compare/v4.0.4...v4.1.0)

Steps to reproduce

  1. install latest versions of react-native-share (4.1.0) and react-native-sensors (7.0.2)
  2. build ios app

Expected behaviour

App is builded

Actual behaviour

Error happenes on last build steps

Platform

iOS

react-native-share

Version: 4.1.0

Link to repo (highly encouraged)

https://github.com/react-native-share/react-native-share

@SnaiNeR SnaiNeR added the bug label Nov 19, 2020
@yang093
Copy link

yang093 commented Nov 24, 2020

The same when using with 'react-native-social-share' package
duplicate symbol 'OBJC_CLASS$_Utils' in:
/Users/yang/Library/Developer/Xcode/DerivedData/test-fcwwhiggbjhhhdatlpuwbmppnfil/Build/Products/Debug-iphonesimulator/RNShare/libRNShare.a(Utils.o)
/Users/yang/Library/Developer/Xcode/DerivedData/test-fcwwhiggbjhhhdatlpuwbmppnfil/Build/Products/Debug-iphonesimulator/RNShareUtils/libRNShareUtils.a(Utils.o)
duplicate symbol 'OBJC_METACLASS$_Utils' in:
/Users/yang/Library/Developer/Xcode/DerivedData/test-fcwwhiggbjhhhdatlpuwbmppnfil/Build/Products/Debug-iphonesimulator/RNShare/libRNShare.a(Utils.o)
/Users/yang/Library/Developer/Xcode/DerivedData/test-fcwwhiggbjhhhdatlpuwbmppnfil/Build/Products/Debug-iphonesimulator/RNShareUtils/libRNShareUtils.a(Utils.o)
ld: 2 duplicate symbols for architecture x86_64

Change react-native-share version from 4.1.0 -> 4.0.4 doesn't work

@SnaiNeR
Copy link
Author

SnaiNeR commented Nov 24, 2020

@yang093 it's must work, did you removed package from node_modules and do npm install && pod install correctly?
in 4.0.4 Utils file is missing

@blueberry6401
Copy link

Same thing here, waiting for the fix.

@yangsamuellu
Copy link

@yang093 it's must work, did you removed package from node_modules and do npm install && pod install correctly?
in 4.0.4 Utils file is missing

Oh, no, i see the Utils file on your repository. https://github.com/react-native-share/react-native-share/blob/v5.1.0/ios/Utils.m

@stale
Copy link

stale bot commented Mar 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open.

@stale stale bot added the stale There has been a lack of activity on this issue and it may be closed soon. label Mar 14, 2021
@stale
Copy link

stale bot commented Mar 21, 2021

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

@stale stale bot closed this as completed Mar 21, 2021
@blueberry6401
Copy link

So what should I do to get this fixed??

@mikehardy
Copy link
Collaborator

@blueberry6401 perhaps propose a change to this repo that renames the Utils object (https://github.com/react-native-share/react-native-share/blob/master/ios/Utils.m and the .h file) to something unambiguous like RNShareUtils

You can even try it by reaching right into node_modules/react-native-share/ios - moving the file to an unambiguous name (and altering the import statements of any files that import it!) and using npx patch-package react-native-share to save your changes.

If it works, you're set - make a PR here with the fix.

@Talha-Jawed
Copy link

Screenshot 2021-05-01 at 11 07 43 PM

@mikehardy getting this error after rename the files name and import statements Utils to RNShareUtils. any solution ?

"react-native": "0.63.4"
"react-native-share": "^5.2.2"
"react-native-sensors": "^7.2.0"

@mikehardy
Copy link
Collaborator

It was hard to read that image - text copy/paste in here is much easier for me. I was able to though

Not sure exactly what's going on - seems like a file move should be easy? The best thing to do is post a draft PR so we can talk about actual code and get a close look at what's going on instead of guessing, is that possible?

@MateusAndrade
Copy link
Collaborator

🎉 This issue has been resolved in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug released stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
7 participants