My code executes this sequence:
Epubdownload request- Unzipping using
SSZipArchive
For example e-book from this link unzips successfully:
https://www.z-epub.com/electronic-book/3633
E-book from Google Books however doesn't:
I get this error:
Error Domain=SSZipArchiveErrorDomain Code=-1 "failed to open zip file" UserInfo={NSLocalizedDescription=failed to open zip file}
Here's an interesting thing, same Google Books e-book is unzipped successfully if I add it to app's Bundle or import it through fileImporter (SwiftUI).
I'm making assumption that this issue might be related with file permissions. I might be wrong though. Can anyone assist?
Let's see what the files look like whet they are downloaded
What have we downloaded -- that appears to be an epub file, and it is also a valid zip file
Now for the document from Google Books.
what have we downloaded?
That isn't an epub file. When I went to the URL in my browser, I found a page in Italian that needed user input. Below image has the English translation.
When I dowloaded the epb file manually from that site it looked fine.
Are you doing anything in your code to bypass the form?