mockingbot / react-native-zip-archive

Zip archive utility for react-native
MIT License
425 stars 155 forks source link

CocoaPods could not find compatible versions for pod "RNZipArchive" #305

Closed Ramaelscs closed 5 months ago

Ramaelscs commented 5 months ago

Describe the bug [!] CocoaPods could not find compatible versions for pod "RNZipArchive": In Podfile: RNZipArchive (from ../node_modules/react-native-zip-archive)

Specs satisfying the RNZipArchive (from../node_modules/react-native-zip-archive) dependency were found, but they required a higher minimum deployment target.

To Reproduce I am using version 6.1.0 and tried with 6.1.1 "react-native": "0.72.7",

Expected behavior Pod install is throwing the error in this error [!] CocoaPods could not find compatible versions for pod "RNZipArchive": In Podfile: RNZipArchive (from ../node_modules/react-native-zip-archive)

Specs satisfying the RNZipArchive (from../node_modules/react-native-zip-archive) dependency were found, but they required a higher minimum deployment target.

Screenshot 2024-05-07 at 8 04 32 PM

I tried to downgrade the version to s.dependency 'SSZipArchive', '~>2.2' in RNZipArchive.podspec then pod install is successful.But if it is version2 2.5.5 then pod install is throwing the error.

plrthink commented 5 months ago

I just found out that we all need to upgrade the deployment version to macOS 10.15+ (with latest security patches), iOS 15.5+, tvOS 15.4+, watchOS 8.4+, as required by SSZipArchive 2.5.0+, which is the underlying dep of the RNZA.

Sorry for the break change and not clarifying in the release notes or readme.

Ramaelscs commented 5 months ago

Yes you are correct I already made the necessary changes, macOS is 14.4.1 (23E224) and I tried IOS 15.6. But still we are facing the same issue.

If I changed the s.dependency 'SSZipArchive', '~>2.2' in RNZipArchive.podspec after installed the node modules and pod install is successful.

plrthink commented 5 months ago

This is not intentional, are you figuring out the solutions without manually changing the spec?

plrthink commented 5 months ago

I just tried with the demo app and it works. Here's the changes: https://github.com/plrthink/RNZATestApp/commit/f7c3a82cb9c7a110e56584e7f39ab45e82ee00ed.

I do face some issues but they can be solved without changing the SSZipArchive by running pod update SSZipArchive.

draculapile commented 5 months ago

Yes you are correct I already made the necessary changes, macOS is 14.4.1 (23E224) and I tried IOS 15.6. But still we are facing the same issue.

If I changed the s.dependency 'SSZipArchive', '~>2.2' in RNZipArchive.podspec after installed the node modules and pod install is successful.

same issue here, and this solution works

bitcrumb commented 5 months ago

You can't expect everyone to just bump the deployment version to 15.5. Neither can you expect us to make changes to the RNZipArchice.podspec file (which could be done by patching the file post-install).

Why was the SSZipArchive dependency bumped to ~>2.5.5? Was it to fix specific issues?

Since keeping it to ~>2.2 still allows to install 2.5.5, but avoids the mentioned issue. Since you are using ~> you are effectively allowing anything yp to 3.0?

plrthink commented 5 months ago

Why was the SSZipArchive dependency bumped to ~>2.5.5? Was it to fix specific issues?

This is trying to fix this issue https://github.com/mockingbot/react-native-zip-archive/issues/302

Since keeping it to ~>2.2 still allows to install 2.5.5, but avoids the mentioned issue. Since you are using ~> you are effectively allowing anything yp to 3.0?

Yes, you're correct, I just made a mistake here.

I think I should release a new version to revert that change.

plrthink commented 5 months ago

I just released version 6.1.2, which reverted the upgrade of the SSZiparchive.

If you need to adapt to app store privacy updates, please update your App's podfile to update SSZipArchive, like this https://github.com/plrthink/RNZATestApp/commit/03d6a9236175d4048f1eec1b0644002b9574bd28#diff-281ded35b124f5160d0a57e47e521ee6f49f233933e091a0d33f3fd42a74abc8.

bitcrumb commented 5 months ago

Well you acted quick :-D

Maybe it is a good idea to do a new release with the update of SSZiparchive. But don't make it into a patch release. Maybe consider a minor (or even major) release due to deployment target?

Since apparently SSZipArchive has updated its deployment target for good reason. Apparently there was a vulnerability:

A key dependency of this project is the zlib library. zlib before version 1.2.12 allows memory corruption when deflating (i.e., when compressing) if the input has many distant matches according to CVE-2018-25032. zlib 1.2.12 is included in macOS 10.15+ (with latest security patches), iOS 15.5+, tvOS 15.4+, watchOS 8.4+. As such, these OS versions will be the new minimums as of version 2.5.0 of ZipArchive.

By making it a new major release for instance, you can indicate in the changelog that it has the consequence of having to bump the deployment target to iOS 15.5.

plrthink commented 5 months ago

Yes, and actually the 6.1.1 release as a patch is a mistake, it should be the major release since it involves the breaking change.

ShaneZhengNZ commented 5 months ago

to be honest, I don't agree with the 6.1.2 revert.

Literally, everybody needs the privacy manifest change, otherwise, your app submission will be rejected by app store instantly. Therefore, depends on SSZiparchive 2.5.5+ is a non-negotiable change.

Even though change to SSZiparchive 2.5.5+ means deployment target change, that is non-negotiable.

So, I don't see the point of 6.1.2, and ask the developers to manually make the change. For me, I am using Expo, therefore, I have no access to the .podspec file.

I will have to stick with 6.1.1, or fork the repo and make the change myself. It is not ideal.

@plrthink @bitcrumb

plrthink commented 5 months ago

@ShaneZhengNZ I would release it as the v7, since it's a breaking change.

plrthink commented 5 months ago

@ShaneZhengNZ the v7 is available now.

sujathasperi2022 commented 4 months ago

Getting this error

[!] CocoaPods could not find compatible versions for pod "RNZipArchive":
  In Podfile:
    RNZipArchive (from `../node_modules/react-native-zip-archive`)

Specs satisfying the `RNZipArchive (from `../node_modules/react-native-zip-archive`)` dependency were found, but they required a higher minimum deployment target.

Screenshot 2024-06-20 at 11 55 07 AM

for below specs

react native - 0.74.1 react-native-zip-archive - 7.0.0

I have update my minimum deployment and ios depployment to 16.0 still am getting the above error

Does anyone came across this issue

blackazaru commented 3 months ago

You have to change platform :ios, min_ios_version_supported to platform :ios, '15.5' in your /ios/Podfile

redom69 commented 2 months ago

In solve it with this

 "react-native-zip-archive": "7.0.0",

Cleaning all the libraries and updating my podfile to this:

platform :ios, '15.5'