Skip to content

Commit

Permalink
Merge pull request #167 from legranddamien/master
Browse files Browse the repository at this point in the history
Fix Semantic Issues (Xcode 9)
  • Loading branch information
belkevich authored Sep 24, 2017
2 parents 094dbc4 + 8933ce5 commit edcc64f
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 15 deletions.
16 changes: 15 additions & 1 deletion APAddressBook.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
CD189A281E9D39D1009CDF82 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0810;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = Alterplay;
TargetAttributes = {
CD189A301E9D39D1009CDF82 = {
Expand Down Expand Up @@ -440,15 +440,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -493,15 +500,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
6 changes: 3 additions & 3 deletions Pod/Core/Private/Thread/APThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@interface APThread : NSThread

- (void)dispatchAsync:(void (^)())block;
- (void)dispatchSync:(void (^)())block;
- (void)dispatchAsync:(void (^)(void))block;
- (void)dispatchSync:(void (^)(void))block;

@end
@end
8 changes: 4 additions & 4 deletions Pod/Core/Private/Thread/APThread.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ @implementation APThread

#pragma mark - public

- (void)dispatchAsync:(void (^)())block
- (void)dispatchAsync:(void (^)(void))block
{
[self performSelector:@selector(performBlock:) onThread:self withObject:block waitUntilDone:NO];
}

- (void)dispatchSync:(void (^)())block
- (void)dispatchSync:(void (^)(void))block
{
[self performSelector:@selector(performBlock:) onThread:self withObject:block waitUntilDone:YES];
}
Expand All @@ -38,9 +38,9 @@ - (void)main

#pragma mark - private

- (void)performBlock:(void (^)())block
- (void)performBlock:(void (^)(void))block
{
block();
}

@end
@end
6 changes: 3 additions & 3 deletions Pod/Core/Public/APAddressBook.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
- (void)loadPhotoByRecordID:(nonnull NSNumber *)recordID
onQueue:(nonnull dispatch_queue_t)queue
completion:(nonnull void (^)(UIImage * _Nullable photo))completion;
- (void)startObserveChangesWithCallback:(nonnull void (^)())callback;
- (void)startObserveChangesWithCallback:(nonnull void (^)(void))callback;
- (void)startObserveChangesOnQueue:(nonnull dispatch_queue_t)queue
callback:(nonnull void (^)())callback;
callback:(nonnull void (^)(void))callback;
- (void)stopObserveChanges;
- (void)requestAccess:(nonnull void (^)(BOOL granted, NSError * _Nullable error))completionBlock;
- (void)requestAccessOnQueue:(nonnull dispatch_queue_t)queue
completion:(nonnull void (^)(BOOL granted, NSError * _Nullable error))completionBlock;

@end
@end
6 changes: 3 additions & 3 deletions Pod/Core/Public/APAddressBook.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ @interface APAddressBook () <APAddressBookExternalChangeDelegate>
@property (nonatomic, strong) APAddressBookContactsRoutine *contacts;
@property (nonatomic, strong) APAddressBookExternalChangeRoutine *externalChange;
@property (nonatomic, strong) APThread *thread;
@property (atomic, copy) void (^externalChangeCallback)();
@property (atomic, copy) void (^externalChangeCallback)(void);
@property (atomic, strong) dispatch_queue_t externalChangeQueue;
@end

Expand Down Expand Up @@ -130,12 +130,12 @@ - (void)loadPhotoByRecordID:(NSNumber *)recordID onQueue:(dispatch_queue_t)queue
}];
}

- (void)startObserveChangesWithCallback:(void (^)())callback
- (void)startObserveChangesWithCallback:(void (^)(void))callback
{
[self startObserveChangesOnQueue:dispatch_get_main_queue() callback:callback];
}

- (void)startObserveChangesOnQueue:(dispatch_queue_t)queue callback:(void (^)())callback
- (void)startObserveChangesOnQueue:(dispatch_queue_t)queue callback:(void (^)(void))callback
{
self.externalChangeCallback = callback;
self.externalChangeQueue = queue;
Expand Down

0 comments on commit edcc64f

Please sign in to comment.