diff --git a/.travis.yml b/.travis.yml index 0880eaa..fde381d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,10 +19,6 @@ matrix: env: FASTLANE_ENV=osx - osx_image: xcode8.3 env: FASTLANE_ENV=ios10_xcode8 - - osx_image: xcode7.3 - env: FASTLANE_ENV=ios9_xcode7 - - osx_image: xcode7.3 - env: FASTLANE_ENV=ios8_xcode7 before_install: # Force bundler 1.12.5 because version 1.13 has issues, see https://github.com/fastlane/fastlane/issues/6065#issuecomment-246044617 - gem uninstall bundler -v '>1.12.5' --force --executables || echo "bundler >1.12.5 is not installed" diff --git a/AFNetworkActivityLogger.podspec b/AFNetworkActivityLogger.podspec index 47dae0b..30141a1 100644 --- a/AFNetworkActivityLogger.podspec +++ b/AFNetworkActivityLogger.podspec @@ -1,17 +1,17 @@ Pod::Spec.new do |s| s.name = 'AFNetworkActivityLogger' - s.version = '3.0.0' + s.version = '4.0.0' s.license = 'MIT' - s.summary = 'AFNetworking 3.0 Extension for Network Request Logging' + s.summary = 'AFNetworking 4.0 Extension for Network Request Logging' s.homepage = 'https://github.com/AFNetworking/AFNetworkActivityLogger' s.authors = { 'Mattt Thompson' => 'm@mattt.me' } s.source = { :git => 'https://github.com/AFNetworking/AFNetworkActivityLogger.git', :tag => s.version } s.source_files = 'AFNetworkActivityLogger' s.requires_arc = true - s.ios.deployment_target = '7.0' - s.osx.deployment_target = '10.9' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.10' s.watchos.deployment_target = '2.0' s.tvos.deployment_target = '9.0' - s.dependency 'AFNetworking/NSURLSession', '~> 3.0' + s.dependency 'AFNetworking/NSURLSession', '~> 4.0' end diff --git a/AFNetworkActivityLogger.xcodeproj/project.pbxproj b/AFNetworkActivityLogger.xcodeproj/project.pbxproj index 1615f51..e73f6c9 100644 --- a/AFNetworkActivityLogger.xcodeproj/project.pbxproj +++ b/AFNetworkActivityLogger.xcodeproj/project.pbxproj @@ -458,7 +458,7 @@ 29D96E5C1BCC34CD00F571A5 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0920; + LastUpgradeCheck = 1140; ORGANIZATIONNAME = Alamofire; TargetAttributes = { 297DF5801C1F1CA2001FA807 = { @@ -486,10 +486,11 @@ }; buildConfigurationList = 29D96E5F1BCC34CD00F571A5 /* Build configuration list for PBXProject "AFNetworkActivityLogger" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 29D96E5B1BCC34CD00F571A5; productRefGroup = 29D96E661BCC34CD00F571A5 /* Products */; @@ -882,6 +883,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -890,12 +892,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -940,6 +944,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -948,12 +953,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -1007,6 +1014,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworkActivityLogger; PRODUCT_NAME = "$(inherited)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; }; name = Debug; }; @@ -1029,6 +1037,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworkActivityLogger; PRODUCT_NAME = "$(inherited)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; }; name = Release; }; diff --git a/AFNetworkActivityLogger.xcodeproj/xcshareddata/xcschemes/AFNetworkActivityLogger OS X.xcscheme b/AFNetworkActivityLogger.xcodeproj/xcshareddata/xcschemes/AFNetworkActivityLogger OS X.xcscheme index 31352b8..381ced3 100644 --- a/AFNetworkActivityLogger.xcodeproj/xcshareddata/xcschemes/AFNetworkActivityLogger OS X.xcscheme +++ b/AFNetworkActivityLogger.xcodeproj/xcshareddata/xcschemes/AFNetworkActivityLogger OS X.xcscheme @@ -1,6 +1,6 @@ + enableUBSanitizer = "YES"> + + + + @@ -42,23 +50,11 @@ - - - - - - - - + + + + @@ -43,23 +51,11 @@ - - - - - - - - + enableUBSanitizer = "YES"> + + + + @@ -42,23 +50,11 @@ - - - - - - - - - - - - + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Cartfile b/Cartfile index f225503..0a5ab31 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "AFNetworking/AFNetworking" ~> 3.0 \ No newline at end of file +github "AFNetworking/AFNetworking" ~> 4.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index b0813f1..574730a 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "AFNetworking/AFNetworking" "3.2.0" +github "AFNetworking/AFNetworking" "4.0.0" diff --git a/Carthage/Checkouts/AFNetworking b/Carthage/Checkouts/AFNetworking index e976d63..6ec99c9 160000 --- a/Carthage/Checkouts/AFNetworking +++ b/Carthage/Checkouts/AFNetworking @@ -1 +1 @@ -Subproject commit e976d63ed220ebe0a6d7c9292ebc0624988c0567 +Subproject commit 6ec99c9134c7eef2c10a93a80bd26db33f921bb4 diff --git a/README.md b/README.md index 9c12d29..5b07493 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # AFNetworkActivityLogger -`AFNetworkActivityLogger` is an extension for [AFNetworking](http://github.com/AFNetworking/AFNetworking/) 3.0 that logs network requests as they are sent and received. +`AFNetworkActivityLogger` is an extension for [AFNetworking](http://github.com/AFNetworking/AFNetworking/) 4.0 that logs network requests as they are sent and received. > `AFNetworkActivityLogger` listens `AFNetworkingTaskDidStartNotification` and `AFNetworkingTaskDidFinishNotification` notifications, which are posted by AFNetworking as session tasks are started and finish. For further customization of logging output, users are encouraged to implement desired functionality by creating new objects that conform to `AFNetworkActivityLoggerProtocol`. -## 2.x -> 3.x Migration +## 2.x -> 3.x/4.x Migration 3.0.0 featured the following breaking API changes: * The log `level` property is now found on the individual unique loggers, rather than the shared logger. This allows for more advanced customization options for logging level. diff --git a/Supporting Files/Info.plist b/Supporting Files/Info.plist index e6985ec..087cfbb 100644 --- a/Supporting Files/Info.plist +++ b/Supporting Files/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0 + 4.0 CFBundleSignature ???? CFBundleVersion - 3.0.0 + 4.0.0 NSPrincipalClass diff --git a/Tests/AFNetworkActivityLoggerTests.m b/Tests/AFNetworkActivityLoggerTests.m index f5ad10d..2ad8a44 100644 --- a/Tests/AFNetworkActivityLoggerTests.m +++ b/Tests/AFNetworkActivityLoggerTests.m @@ -117,11 +117,12 @@ - (void)testThatStartCallbackIsReceived { [manager GET:@"ip" parameters:nil + headers:nil progress:nil success:nil failure:nil]; [self waitForExpectationsWithTimeout:10.0 handler:nil]; - [manager invalidateSessionCancelingTasks:YES]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; } - (void)testThatFinishCallbackIsReceived { @@ -143,11 +144,12 @@ - (void)testThatFinishCallbackIsReceived { [manager GET:@"ip" parameters:nil + headers:nil progress:nil success:nil failure:nil]; [self waitForExpectationsWithTimeout:10.0 handler:nil]; - [manager invalidateSessionCancelingTasks:YES]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; } - (void)testThatFinishCallbackIsReceivedWithError { @@ -169,11 +171,12 @@ - (void)testThatFinishCallbackIsReceivedWithError { [manager GET:@"status/404" parameters:nil + headers:nil progress:nil success:nil failure:nil]; [self waitForExpectationsWithTimeout:10.0 handler:nil]; - [manager invalidateSessionCancelingTasks:YES]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; } - (void)testThatFilterPredicateIsRespectedForStartCallback { @@ -198,13 +201,14 @@ - (void)testThatFilterPredicateIsRespectedForStartCallback { [manager GET:@"ip" parameters:nil + headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { [expectation fulfill]; } failure:nil]; [self waitForExpectationsWithTimeout:10.0 handler:nil]; - [manager invalidateSessionCancelingTasks:YES]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; } - (void)testThatFilterPredicateIsRespectedForFinishCallback { @@ -229,13 +233,14 @@ - (void)testThatFilterPredicateIsRespectedForFinishCallback { [manager GET:@"ip" parameters:nil + headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { [expectation fulfill]; } failure:nil]; [self waitForExpectationsWithTimeout:10.0 handler:nil]; - [manager invalidateSessionCancelingTasks:YES]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; } - (void)testThatIndividualLoggerIsNotCalledWhenLoggerIsNilledOut { @@ -256,13 +261,14 @@ - (void)testThatIndividualLoggerIsNotCalledWhenLoggerIsNilledOut { [manager GET:@"ip" parameters:nil + headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { [expectation fulfill]; } failure:nil]; [self waitForExpectationsWithTimeout:10.0 handler:nil]; - [manager invalidateSessionCancelingTasks:YES]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; }