From c4fe6e466d382b365c1d80868ff713e4405512e9 Mon Sep 17 00:00:00 2001 From: Nick Gillett Date: Fri, 23 Nov 2018 11:25:00 -0800 Subject: [PATCH] Update project settings to latest xcode and fix warnings --- Source/OCMock.xcodeproj/project.pbxproj | 6 +++++- .../xcshareddata/xcschemes/OCMock iOS.xcscheme | 8 +++----- .../xcshareddata/xcschemes/OCMock tvOS.xcscheme | 4 +--- .../xcshareddata/xcschemes/OCMock.xcscheme | 8 +++----- .../xcshareddata/xcschemes/OCMockLib.xcscheme | 8 +++----- Source/OCMockTests/OCMockObjectTests.m | 6 +++--- 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/Source/OCMock.xcodeproj/project.pbxproj b/Source/OCMock.xcodeproj/project.pbxproj index cfdb7c73..8df51412 100644 --- a/Source/OCMock.xcodeproj/project.pbxproj +++ b/Source/OCMock.xcodeproj/project.pbxproj @@ -1072,7 +1072,7 @@ isa = PBXProject; attributes = { LastTestingUpgradeCheck = 0510; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Mulle Kybernetik"; TargetAttributes = { 03565A3018F0566E003AE91E = { @@ -1431,11 +1431,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -1479,11 +1481,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; diff --git a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock iOS.xcscheme b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock iOS.xcscheme index 3f59fd2e..95b30562 100644 --- a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock iOS.xcscheme +++ b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock iOS.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -71,7 +70,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock tvOS.xcscheme b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock tvOS.xcscheme index 98aaebb1..f1fd7e8b 100644 --- a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock tvOS.xcscheme +++ b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock tvOS.xcscheme @@ -1,6 +1,6 @@ @@ -37,7 +36,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock.xcscheme b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock.xcscheme index 6877fd47..28c5cf16 100644 --- a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock.xcscheme +++ b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -58,7 +57,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMockLib.xcscheme b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMockLib.xcscheme index aa8da41a..fb3055ca 100644 --- a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMockLib.xcscheme +++ b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMockLib.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,7 +47,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Source/OCMockTests/OCMockObjectTests.m b/Source/OCMockTests/OCMockObjectTests.m index 417e8ed2..3b35e71c 100644 --- a/Source/OCMockTests/OCMockObjectTests.m +++ b/Source/OCMockTests/OCMockObjectTests.m @@ -978,7 +978,7 @@ - (void)testAcceptsAndVerifiesExpectedMethodsWithDelayBlock { dispatch_async(dispatch_queue_create("mockqueue", nil), ^{ [NSThread sleepForTimeInterval:0.1]; - [mock lowercaseString]; + [self->mock lowercaseString]; }); [[mock expect] lowercaseString]; @@ -989,7 +989,7 @@ - (void)testFailsVerifyExpectedMethodsWithoutDelay { dispatch_async(dispatch_queue_create("mockqueue", nil), ^{ [NSThread sleepForTimeInterval:0.1]; - [mock lowercaseString]; + [self->mock lowercaseString]; }); [[mock expect] lowercaseString]; @@ -1176,7 +1176,7 @@ - (void)testVerifyWithDelayDoesNotWaitForRejects [[mock expect] hasPrefix:OCMOCK_ANY]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [mock hasPrefix:@"foo"]; + [self->mock hasPrefix:@"foo"]; }); NSDate *start = [NSDate date];