mockingbot / react-native-zip-archive

Zip archive utility for react-native
MIT License
420 stars 154 forks source link

[IOS] Crash app when zip or unzip on Xcode 15 #293

Closed tucoi052 closed 10 months ago

tucoi052 commented 10 months ago

Describe the bug Hello everyone. I just updated on MacOs 14 and Xcode 15, I got the error of this library When I zip or unzip a folder, I get an error

EXC_BAD_ACCESS (code=1, address=0x71000508b94017e8)

Screenshot 2023-10-18 at 09 49 06

Here is the basic Code

const pathContent = RNFS.CachesDirectoryPath + '/zip/contentsfile.txt'; await RNFS.writeFile(pathContent,contents,//This variable is a string of characters); const targetPath = dir + /${newName}.zip; await zip(RNFS.CachesDirectoryPath + '/zip', targetPath);

Expected behavior To zip and unzip the .zip file like usual

Env:

Thank you a lots

plrthink commented 10 months ago

I haven't encountered this in our projects. Could you share the other packages your project is using? After some research, I think there might be collisions as described here: https://github.com/ZipArchive/ZipArchive/issues/362

tucoi052 commented 10 months ago

Thanks for your support. I fixed this using ZipArchive instead of using Zip