You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 20, 2025. It is now read-only.
duplicate symbol _OBJC_IVAR_$_SSZipArchive._zip in: #241
Delete SSZipArchive from the CodePush library project
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.
Closing this, feel free to reopen if this does not work for you.
Reacted by Kyle Finley, Perry and JRK
Reacted by Alex Rothberg, Cesar Kawakami, RoosterKelly, Diel Duarte, xclidongbo, sombizbuzzz and VrajSolanki
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?
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.
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.
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.
Reacted by Cesar Kawakami, valinaga, Fansx, Evan and sombizbuzzz
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.
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.
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?
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
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?
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
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.
Activity
geof90 commentedon Mar 12, 2016
Hi Chirag Jain (@chirag04) (and anyone else who could be hitting this issue),
The full workaround is to
Closing this, feel free to reopen if this does not work for you.
chirag04 commentedon Apr 26, 2016
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?
geof90 commentedon May 17, 2016
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.
cancan101 commentedon May 25, 2016
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.lostintangent commentedon May 25, 2016
Alex Rothberg (@cancan101) It's definitely non-ideal. Unfortunately,
react-native-zip-archivealso bundles a copy ofSSZipArchivewith 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.cancan101 commentedon May 25, 2016
Yes, am trying to use
react-native-zip-archiveand 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-pushusing cocoapods is the requirement to then install RN using cocoapods which I do not want to do.plrthink commentedon Nov 16, 2016
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.
itinance commentedon Nov 16, 2016
From the codepush-docs:
Have you tried this out?
plrthink commentedon Nov 16, 2016
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
SSZipArchivetoRNSSZipArchiveand 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-archivevia github withcustom-ssziparchivebranch now.Still trying to find a better solution...
RoosterKelly commentedon Jun 8, 2017
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?
plrthink commentedon Jun 9, 2017
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 ASAPplrthink commentedon Jun 12, 2017
For folks still use some workarounds to solve this issue, please update
react-native-zip-archiveto v2 which would fix this out of the box.peacechen commentedon Jul 19, 2018
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?
VrajSolanki commentedon Dec 5, 2019
Geoffrey Goh (@geof90) Chirag Jain (@chirag04)
I tried remove the SSZIPArchive folder and added custom branch
custom-ssziparchivefrom react-native-zip-archive as suggested by Perry (@plrthink).But now codePush.a linking fails with the error:
can you please suggest something here ?
plrthink commentedon Dec 5, 2019
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.