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

Crash. Define -[PKMultipartInputStream propertyForKey:]!'` #14

Closed banshchikov closed 7 years ago

banshchikov commented 7 years ago

Hi there! I'm trying to use ShareKit SDK to upload video to OneNote. It crashes everytime:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -propertyForKey: only defined for abstract class. Define -[PKMultipartInputStream propertyForKey:]!'

banshchikov commented 7 years ago

Fixed. I've added few methods to implementation:

- (id)propertyForKey:(NSStreamPropertyKey)key {
    return nil;
}

- (BOOL)setProperty:(id)property forKey:(NSStreamPropertyKey)key {
    return NO;
}
pyke369 commented 7 years ago

Hi Andrey,

Could you submit a PR with this changes, I will happily merge it.

Thanks, Pierre-Yves