Custom NSInputStream with 100 lines of code
Pavel Osipov
105

New method looks interesting, but I don’t think that it is a game changer. It still requires to save received data in the app’s sandbox before uploading.

Well, I would argue with that.

It seems like PHAssetResourceManager’s method requestDataForAssetResource:options:dataReceivedHandler:completionHandler: streams its data chunks directly from the source file, no extra space needed.

Actually I came up with the following implementation of POSBlobInputStreamDataSource that streams its data from PHAssetResource. Would you mind taking a look?

https://github.com/fromcelticpark/PHAssetResourceInputStream