From 6fa3fac4aed9bf36d14568f4d41a70424abd3721 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 7 Jul 2017 11:00:52 -0400 Subject: [PATCH] Fix broken tests. // FREEBIE --- Example/TSKitiOSTestApp/Podfile | 3 ++- Example/TSKitiOSTestApp/Podfile.lock | 2 +- .../xcshareddata/xcschemes/TSKitiOSTestApp.xcscheme | 2 +- src/Network/API/TSNetworkManager.h | 2 +- src/Network/API/TSNetworkManager.m | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Example/TSKitiOSTestApp/Podfile b/Example/TSKitiOSTestApp/Podfile index 96619ecd8..ac9917f84 100644 --- a/Example/TSKitiOSTestApp/Podfile +++ b/Example/TSKitiOSTestApp/Podfile @@ -21,7 +21,8 @@ post_install do |installer| existing_definitions = "$(inheritied)" end - config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = "#{existing_definitions} SSK_BUILDING_FOR_TESTS=1" + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = "#{existing_definitions} SSK_BUILDING_FOR_TESTS=1" + config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '-DSSK_BUILDING_FOR_TESTS'] end end end diff --git a/Example/TSKitiOSTestApp/Podfile.lock b/Example/TSKitiOSTestApp/Podfile.lock index 02217da28..c66d52d58 100644 --- a/Example/TSKitiOSTestApp/Podfile.lock +++ b/Example/TSKitiOSTestApp/Podfile.lock @@ -140,6 +140,6 @@ SPEC CHECKSUMS: UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266 -PODFILE CHECKSUM: 124c05542083fefccb75f4b7afbdd839e27ff5ab +PODFILE CHECKSUM: a0f4507b6b4e6f9da3250901b06187a67236e083 COCOAPODS: 1.2.1 diff --git a/Example/TSKitiOSTestApp/TSKitiOSTestApp.xcodeproj/xcshareddata/xcschemes/TSKitiOSTestApp.xcscheme b/Example/TSKitiOSTestApp/TSKitiOSTestApp.xcodeproj/xcshareddata/xcschemes/TSKitiOSTestApp.xcscheme index faa3aee10..17bb32fd8 100644 --- a/Example/TSKitiOSTestApp/TSKitiOSTestApp.xcodeproj/xcshareddata/xcschemes/TSKitiOSTestApp.xcscheme +++ b/Example/TSKitiOSTestApp/TSKitiOSTestApp.xcodeproj/xcshareddata/xcschemes/TSKitiOSTestApp.xcscheme @@ -28,7 +28,7 @@ buildForAnalyzing = "YES"> diff --git a/src/Network/API/TSNetworkManager.h b/src/Network/API/TSNetworkManager.h index 0bd654ec2..aca526709 100644 --- a/src/Network/API/TSNetworkManager.h +++ b/src/Network/API/TSNetworkManager.h @@ -30,7 +30,7 @@ extern NSString *const TSNetworkManagerDomain; - (instancetype)init NS_UNAVAILABLE; -+ (id)sharedManager; ++ (instancetype)sharedManager; - (void)makeRequest:(TSRequest *)request success:(void (^)(NSURLSessionDataTask *task, id responseObject))success diff --git a/src/Network/API/TSNetworkManager.m b/src/Network/API/TSNetworkManager.m index 3005dbe17..1fd8e8232 100644 --- a/src/Network/API/TSNetworkManager.m +++ b/src/Network/API/TSNetworkManager.m @@ -22,7 +22,8 @@ typedef void (^failureBlock)(NSURLSessionDataTask *task, NSError *error); #pragma mark Singleton implementation -+ (id)sharedManager { ++ (instancetype)sharedManager +{ static TSNetworkManager *sharedMyManager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{