Skip to content

Commit

Permalink
Fix iOS 9 build
Browse files Browse the repository at this point in the history
  • Loading branch information
kwigginton committed Jul 23, 2015
1 parent e5a87cf commit de1c145
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Logging/ARKDataArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)appendArchiveOfObject:(id <NSSecureCoding>)object;

/// Reads in all contents of the archive, unarchives each object, and returns them on the main thread.
- (void)readObjectsFromArchiveWithCompletionHandler:(void (^)(NSArray *unarchivedObjects))completionHandler;
- (void)readObjectsFromArchiveWithCompletionHandler:(nonnull void (^)(NSArray *unarchivedObjects))completionHandler;

/// Empties the archive (but does not remove the file). Completion handler is called on the main queue.
- (void)clearArchiveWithCompletionHandler:(nullable dispatch_block_t)completionHandler;
Expand Down
15 changes: 13 additions & 2 deletions Logging/ARKDataArchive.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#import "NSFileHandle+ARKAdditions.h"


NS_ASSUME_NONNULL_BEGIN


NSUInteger const ARKMaximumChunkSizeForTrimOperation = (1024 * 1024);


Expand All @@ -42,7 +45,12 @@ @implementation ARKDataArchive

#pragma mark - Initialization

- (instancetype)initWithURL:(NSURL *)fileURL maximumObjectCount:(NSUInteger)maximumObjectCount trimmedObjectCount:(NSUInteger)trimmedObjectCount;
- (nullable instancetype)init NS_UNAVAILABLE;
{
ARKCheckCondition(NO, nil, @"Use initWithURL:maximumObjectCount:trimmedObjectCount:");
}

- (nullable instancetype)initWithURL:(NSURL *)fileURL maximumObjectCount:(NSUInteger)maximumObjectCount trimmedObjectCount:(NSUInteger)trimmedObjectCount;
{
ARKCheckCondition([fileURL isFileURL], nil, @"Must provide a file URL!");

Expand Down Expand Up @@ -173,7 +181,7 @@ - (void)readObjectsFromArchiveWithCompletionHandler:(void (^)(NSArray *unarchive
[self.fileOperationQueue addOperation:readOperation];
}

- (void)clearArchiveWithCompletionHandler:(dispatch_block_t)completionHandler;
- (void)clearArchiveWithCompletionHandler:(nullable dispatch_block_t)completionHandler;
{
[self.fileOperationQueue addOperationWithBlock:^{
self.objectCount = 0;
Expand Down Expand Up @@ -252,3 +260,6 @@ - (void)_saveArchive_inFileOperationQueue;
}

@end


NS_ASSUME_NONNULL_END

0 comments on commit de1c145

Please sign in to comment.