Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

duplicate symbol _OBJC_IVAR_$_SSZipArchive._zip in: #241

Closed

Description

@chirag04

I get the above issue when configuring codepush. We are also using https://github.com/plrthink/react-native-zip-archive which also rely on SSZipArchive.

cc Jonathan Carter (@lostintangent)

Activity

  1. geof90 commented on Mar 12, 2016

    @geof90
    Contributor

    Hi Chirag Jain (@chirag04) (and anyone else who could be hitting this issue),

    The full workaround is to

    1. Delete SSZipArchive from the CodePush library project
      screen shot 2016-03-11 at 6 22 53 pm
    2. Update the Header Search Paths of the CodePush library project to point at the version of SSZipArchive that is bundled together with the react-native-zip-archive plugin.
      screen shot 2016-03-11 at 6 24 21 pm

    Closing this, feel free to reopen if this does not work for you.

  2. chirag04 commented on Apr 26, 2016

    @chirag04
    Author

    Geoffrey Goh (@geof90) well this work but everytime i npm install i would need to delete the folder and set the path again. Can we do one time setup?

  3. geof90 commented on May 17, 2016

    @geof90
    Contributor

    Chirag Jain (@chirag04) Sorry for the late reply, I somehow missed this. The best way I see to prevent having the manual deletion step is to make a fork of our project, delete the folder in that fork, and then specify your fork's github URL as a dependency in your package.json.

  4. cancan101 commented on May 25, 2016

    @cancan101

    This solution seems less than ideal. Why does this project need to vendor SSZipArchive? Is there no way to handle this dependency in a smarter fashion that does not conflict with other npm packages?

    ie some equivalent of NoZip.

  5. lostintangent commented on May 25, 2016

    @lostintangent
    Member

    Alex Rothberg (@cancan101) It's definitely non-ideal. Unfortunately, react-native-zip-archive also bundles a copy of SSZipArchive with it, so we couldn't easily share a common dependency from CocoaPods/etc. with that package, if both it and CodePush were installed.

    Which NPM package is creating the conflict for you? Are you also trying to use react-native-zip-archive? I'll give some thought to this issue today since I agree it needs to be addressed.

  6. cancan101 commented on May 25, 2016

    @cancan101

    Yes, am trying to use react-native-zip-archive and I do see they are vendoring as well. I suppose you are both doing so to solve the problem of dependency management in the case where the user is not using Cocoapods.

    The reason that I don't want to install react-native-code-push using cocoapods is the requirement to then install RN using cocoapods which I do not want to do.

  7. plrthink commented on Nov 16, 2016

    @plrthink

    I'm the author of react-native-zip-archive. I'm also facing this problem today since we are integrating CodePush to our own app.

    Honestly, I'm not familiar with native development and I don't know how cocoapod solve this dependency so is there anything I can do with that? I'm so willing to fix this with codepush team.

  8. itinance commented on Nov 16, 2016

    @itinance

    From the codepush-docs:

    CodePush depends on an internal copy of the SSZipArchive library, so if your project already includes it (either directly or via a transitive dependency), then you can install a version of CodePush which excludes it by depending specifically on the Core subspec:

    pod 'CodePush', :path => './node_modules/react-native-code-push', :subspecs => ['Core']
    NOTE: The above paths needs to be relative to your app’s Podfile, so adjust it as nec cessary.

    Have you tried this out?

  9. plrthink commented on Nov 16, 2016

    @plrthink

    Hagen Hübel (@itinance) I haven't tried that approach yet. But I think not every rn users use cocoapod, so I still want to try some other solutions.

    My colleague told me that since the linker in xcode identifies code by its class names so I changed the class name of SSZipArchive to RNSSZipArchive and this solved the problem. But it still not a perfect way to do that.

    If any user is facing the same issue then you can install react-native-zip-archive via github with custom-ssziparchive branch now.

    Still trying to find a better solution...

  10. RoosterKelly commented on Jun 8, 2017

    @RoosterKelly

    Geoffrey Goh (@geof90) This is still a significant problem. Is there yet a good solution that does not require constant management of this package just so it does not conflict with other react native modules?
    Solutions found so far:

    Delete the SSZipArchive and update the search path, which gets overwritten on ever npm install

    Create fork, do your own builds. When keep track of updates to parent get and merge changes any time you need them.

    Both solutions incur significant cost on any team that runs into this issue.

    Perry (@plrthink) Have you had any success on finding a work around on your end?

  11. plrthink commented on Jun 9, 2017

    @plrthink

    RoosterKelly I have just pushed the next branch which should fix this issue. You can install it via "react-native-zip-archive": "mockingbot/react-native-zip-archive#next" to test it out. If it works on your side, I would publish a version to npm ASAP

  12. plrthink commented on Jun 12, 2017

    @plrthink

    For folks still use some workarounds to solve this issue, please update react-native-zip-archive to v2 which would fix this out of the box.

  13. peacechen commented on Jul 19, 2018

    @peacechen

    I upgraded my project to RN 0.56 and CodePush 5.4.0. The build blew up complaining of duplicate symbol errors for Base64, JWT and SSZipArchive. itinance's suggestion of subspecs => ['Core'] for the CodePush pod fixed the problem.

    My app isn't using react-native-zip-archive so I'm not sure what's pulling that in. Maybe because CodePush.xcodeproj is included under the project's Libraries?

  14. VrajSolanki commented on Dec 5, 2019

    @VrajSolanki

    Geoffrey Goh (@geof90) Chirag Jain (@chirag04)
    I tried remove the SSZIPArchive folder and added custom branch custom-ssziparchive from react-native-zip-archive as suggested by Perry (@plrthink).
    But now codePush.a linking fails with the error:

    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_RNSSZipArchive", referenced from:
          objc-class-ref in libCodePush.a(CodePushPackage.o)
    ld: symbol(s) not found for architecture x86_64
    

    can you please suggest something here ?

  15. plrthink commented on Dec 5, 2019

    @plrthink

    VrajSolanki If your react native is above version 60 you can simply use the latest version of there two libraries which would solve the problem automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions