Skip to content

Commit

Permalink
Update to Alamofire 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
konkab committed Nov 27, 2020
1 parent 1809762 commit 8db9d4e
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 69 deletions.
7 changes: 0 additions & 7 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

This file was deleted.

6 changes: 3 additions & 3 deletions AlamofireNetworkActivityLogger.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AlamofireNetworkActivityLogger'
s.version = '3.1.0'
s.version = '3.4.0'
s.license = 'MIT'
s.summary = 'Network request logger for Alamofire'
s.homepage = 'https://github.com/konkab/AlamofireNetworkActivityLogger'
Expand All @@ -9,12 +9,12 @@ Pod::Spec.new do |s|

s.source = { :git => 'https://github.com/konkab/AlamofireNetworkActivityLogger.git', :tag => s.version }
s.source_files = 'Source/*.swift'
s.swift_versions = ['5.1']
s.swift_versions = ['5.1', '5.2', '5.3']

s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'

s.dependency 'Alamofire', '~> 5.4'
s.dependency 'Alamofire', '~> 5.4.0'
end
4 changes: 3 additions & 1 deletion AlamofireNetworkActivityLogger.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
AB2A9A221DBB4600004FC92E /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1220;
ORGANIZATIONNAME = "RKT Studio";
TargetAttributes = {
AB2A9A2A1DBB4600004FC92E = {
Expand Down Expand Up @@ -495,6 +495,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -562,6 +563,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:AlamofireNetworkActivityLogger.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:AlamofireNetworkActivityLogger.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:AlamofireNetworkActivityLogger.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:AlamofireNetworkActivityLogger.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Alamofire/Alamofire" "5.4"
github "Alamofire/Alamofire" ~> 5.4.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Alamofire/Alamofire" "5.0.0-rc.2"
github "Alamofire/Alamofire" "5.4.0"
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
"state": {
"branch": null,
"revision": "2cbf59935fbb1f26e352ce4db53f1cf9408d5313",
"version": "5.0.0-rc.3"
"revision": "9e0328127dfb801cefe8ac53a13c0c90a7770448",
"version": "5.4.0"
}
}
]
Expand Down
63 changes: 37 additions & 26 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
// swift-tools-version:5.1
//
// Package.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2016 Konstantin Kabanov
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import PackageDescription

let package = Package(
name: "AlamofireNetworkActivityLogger",
platforms: [
.iOS(.v10),
.macOS(.v10_12),
.tvOS(.v10),
.watchOS(.v3)
],
products: [
.library(
name: "AlamofireNetworkActivityLogger",
targets: ["AlamofireNetworkActivityLogger"]),
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.0.0-rc.3")),
],
targets: [
.target(
name: "AlamofireNetworkActivityLogger",
dependencies: [
"Alamofire",
],
path: "Source"),
],
swiftLanguageVersions: [.v5]
)
let package = Package(name: "AlamofireNetworkActivityLogger",
platforms: [.iOS(.v10),
.macOS(.v10_12),
.tvOS(.v10),
.watchOS(.v3)],
products: [.library(name: "AlamofireNetworkActivityLogger", targets: ["AlamofireNetworkActivityLogger"])],
dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git",
from: "5.4.0")],
targets: [.target(name: "AlamofireNetworkActivityLogger",
dependencies: ["Alamofire"],
path: "Source")],
swiftLanguageVersions: [.v5])
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Network activity logger for Alamofire.
## Requirements

- iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+
- Xcode 10.2+
- Swift 5+
- Xcode 11+
- Swift 5.1+

## Dependencies

- [Alamofire 5.0.0-rc.2+](https://github.com/Alamofire/Alamofire)
- [Alamofire 5.4.0+](https://github.com/Alamofire/Alamofire)

## Installation

Expand All @@ -26,7 +26,7 @@ Network activity logger for Alamofire.
$ gem install cocoapods
```

> CocoaPods 1.7.5+ is required.
> CocoaPods 1.10.0+ is required.
To integrate AlamofireNetworkActivityLogger into your Xcode project using CocoaPods, specify it in your `Podfile`:

Expand All @@ -35,7 +35,7 @@ source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

pod 'AlamofireNetworkActivityLogger', '~> 3.0'
pod 'AlamofireNetworkActivityLogger', '~> 3.4'
```

Then, run the following command:
Expand All @@ -58,7 +58,19 @@ $ brew install carthage
To integrate AlamofireNetworkActivityLogger into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "konkab/AlamofireNetworkActivityLogger" ~> 3.0
github "konkab/AlamofireNetworkActivityLogger" ~> 3.4
```

### Swift Package Manager

The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.

Once you have your Swift package set up, adding AlamofireNetworkActivityLogger as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```swift
dependencies: [
.package(url: "https://github.com/konkab/AlamofireNetworkActivityLogger.git", .upToNextMajor(from: "3.4.0"))
]
```

---
Expand All @@ -77,7 +89,7 @@ Add the following code to `AppDelegate.swift application:didFinishLaunchingWithO
NetworkActivityLogger.shared.startLogging()
```

Now all NSURLSessionTask objects created by an Alamofire.SessionManager will have their request and response logged to the console, a la:
Now all NSURLSessionTask objects created by an Alamofire.Session will have their request and response logged to the console, a la:

```
---------------------
Expand All @@ -97,7 +109,7 @@ NetworkActivityLogger.shared.level = .error
Konstantin Kabanov

- [email protected]
- Skype: konstantin_kabanov
- [Telegram: konstantin_kabanov](https://t.me/konstantin_kabanov)
- [Linkedin](https://ru.linkedin.com/in/konstantinkabanov)

## License
Expand Down

0 comments on commit 8db9d4e

Please sign in to comment.