Open incanus opened 12 years ago
Someone added this for us per https://github.com/CocoaPods/Specs/commit/e93400aebf982a19efefd4f558f750a2ada33374 Need to check on it.
It turns out this error for [stream readDataOfLength:info.length]; No visible @interface
@fabiomassimo I have the same issue ( [stream readDataOfLength:info.length]; No visible @interface). Do you know a fix for this? Seems SimpleKML in CocoaPods is not using the right version of Objective-Zip?
I've solved by added this snippet of code in ZipReadStream.m:
- (NSData *)readDataOfLength:(NSUInteger)length {
NSMutableData *data = [NSMutableData dataWithLength:length];
int bytes = unzReadCurrentFile(_unzFile, [data mutableBytes], (unsigned)length);
if (bytes < 0) {
NSString *reason= [NSString stringWithFormat:@"Error in reading '%@' in the zipfile", _fileNameInZip];
@throw [[[ZipException alloc] initWithError:bytes reason:reason] autorelease];
}
[data setLength:bytes];
return data;
}
And obviously in ZipReadStream.h:
- (NSData *)readDataOfLength:(NSUInteger)length;
Cool, thanks! I just commented the code because I am not using ZIPs after all. But still, good to have this option.
I'm not actively maintaining the version in CocoaPods (and I didn't add it). Thanks for looking into this.
Another strange behavior in import from cocoa pods. Every time I trigger a pod install or pod update i have this error: libxml/tree.h file not found I've to added manually in Simple KML Header source path this string $(SDKROOT)/usr/include/libxml2 Anyone have founded a better solution?
See also #21.