Reputation: 682
In my iOS Swift application I have images stored as NSData in a Realm database. Now I want to combine these images (or a subset query of them) into a single ZIP file and make it available for further transfer via Airdrop, Email and so on.
I am fine with how to transfer and how to get them out of the database but I have no clue how to create a single ZIP file out of a bunch of NSData objects.
Upvotes: 1
Views: 1147
Reputation: 7596
You could simply serialize and archive your images instead before AirDrop sharing. See AirDropSample.
Upvotes: 0
Reputation: 682
After changing some keywords in Google for the search, I found 2 interesting looking Libs/Frameworks I now will start investigating in.
and
Both can be found on GitHub. I have no big experiences with both of them at the moment. But ZipArchive
seems to have options for NSData
Support as this is already stated in the Readme
Zip-up NSData instances. (with a filename)
So this might be an indicator for me.
Upvotes: 1