pyke369 / PKMultipartInputStream

an NSInputStream subclass suitable for building multipart/form-data http requests bodies in MacOSX/iOS applications.
http://github.com/pyke369/PKMultipartInputStream
MIT License
73 stars 19 forks source link

Exception: -setDelegate: only defined for abstract class. Define -[PKMultipartBodyStream setDelegate:]!' #10

Closed ayoy closed 8 years ago

ayoy commented 8 years ago

Hi and thanks a lot for this nice and handy class!

I came across a small issue when using PKMultipartInputStream with NSURLSession and NSURLSessionUploadTask. The exception as in title is thrown, and it's basically the same as described in this AFNetworking issue. The solution requires synthesizing a delegate property in PKMultipartBodyStream.m, just like Mattt did in AFMultipartBodyStream in this commit.

For now, as a workaround, I subclass PKMultipartBodyStream and synthesize a delegate in my class. It would be nice to have this fixed upstream, though :)

pyke369 commented 8 years ago

Hello Dominik,

Would you be kind enough to propose a PR for this?

Thanks a lot. Pierre-Yves

ayoy commented 8 years ago

Sure, here you are :)

pyke369 commented 8 years ago

Merged. Thx.