From a6fbef1b9fa0e074236b3cae747e4dcb9303a313 Mon Sep 17 00:00:00 2001 From: Dov Frankel Date: Mon, 2 Nov 2015 12:27:55 -0500 Subject: [PATCH] Added NS_UNAVAILABLE init() implementation to silence compiler warning with Xcode 7 --- Classes/URKArchive.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Classes/URKArchive.mm b/Classes/URKArchive.mm index 8126504..2c791c7 100644 --- a/Classes/URKArchive.mm +++ b/Classes/URKArchive.mm @@ -22,6 +22,8 @@ - (instancetype)initWithFile:(NSURL *)fileURL password:(NSString*)password #endif ; +- (instancetype)init NS_UNAVAILABLE; + @property (strong) NSData *fileBookmark; @property (strong) void(^bufferedReadBlock)(NSData *dataChunk); @@ -63,6 +65,14 @@ + (URKArchive *)rarArchiveAtURL:(NSURL *)fileURL password:(NSString *)password #pragma mark - Initializers +- (instancetype)init { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:@"-init is not a valid initializer for the class URKArchive" + userInfo:nil]; + + return nil; +} + - (instancetype)initWithFile:(NSURL *)fileURL { return [self initWithFile:fileURL password:nil];