I have a package-type document - i.e. it's really a folder, but it uses NSFileWrapper
and conforms to com.apple.package
to appear as a file - which I want to share by email. I've made an MFMailComposeViewController
and I'm trying to work out what to give to the first parameter of addAttachmentData:mimeType:fileName:
.
The package contains an image file and a plist, though that could change in the future.
How do I convert a package to data? Is that the right way of doing this?