Skip to content

Commit

Permalink
Added NS_UNAVAILABLE init() implementation to silence compiler warnin…
Browse files Browse the repository at this point in the history
…g with Xcode 7
  • Loading branch information
abbeycode committed Nov 2, 2015
1 parent b8a6762 commit a6fbef1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Classes/URKArchive.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit a6fbef1

Please sign in to comment.