Skip to content

Commit 879a3ed

Browse files
authored
Merge pull request #220 from kasketis/develop
Refactor, SPM support and exclude URLs based on a regex
2 parents 92dbe40 + cd73205 commit 879a3ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+918
-1071
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
*.xcuserdatad
3+
.swiftpm
34

45
# Created by https://www.gitignore.io/api/xcode,osx
56

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Package.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// swift-tools-version:5.3
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "netfox",
7+
platforms: [
8+
.iOS(.v9)
9+
],
10+
products: [
11+
.library(
12+
name: "netfox",
13+
targets: ["netfox"]
14+
),
15+
],
16+
targets: [
17+
.target(name: "netfox",
18+
path: "netfox/",
19+
exclude: ["OSX"])
20+
],
21+
swiftLanguageVersions: [.v5]
22+
)

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
![Netfox: A lightweight, one line setup, network debugging library](https://raw.githubusercontent.com/kasketis/netfox/master/netfox-logo.png)
22

33
<p align="center">
4-
<img alt="Version" src="https://img.shields.io/badge/version-1.11-green.svg?style=flat-square" />
4+
<img alt="Version" src="https://img.shields.io/badge/version-1.20.0-green.svg?style=flat-square" />
55
<a href="https://travis-ci.org/kasketis/netfox"><img alt="CI Status" src="http://img.shields.io/travis/kasketis/netfox.svg?style=flat-square" /></a>
66
<a href="https://cocoapods.org/pods/netfox"><img alt="Cocoapods Compatible" src="https://img.shields.io/cocoapods/v/netfox.svg?style=flat-square" /></a>
77
<a href="https://github.com/Carthage/Carthage"><img alt="Carthage Compatible" src="https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat-square" /></a>
88
<img alt="Platform" src="https://img.shields.io/cocoapods/p/netfox.svg?style=flat-square" />
99
<a href="https://opensource.org/licenses/MIT"><img alt="License" src="https://img.shields.io/badge/license-MIT-orange.svg?style=flat-square" /></a>
1010
</p>
1111

12+
1213
Netfox provides a quick look on all executed network requests performed by your iOS or OSX app.
1314
It grabs all requests - of course yours, requests from 3rd party libraries (such as AFNetworking, Alamofire or else), UIWebViews, and more
1415

1516
Very useful and handy for network related issues and bugs
1617

17-
Supports Swift 4 and above - bridged also for Objective-C.
18+
Supports Swift 5 and above - bridged also for Objective-C.
19+
20+
For Swift 4 support, use version [1.19.0](https://github.com/kasketis/netfox/releases/tag/1.19.0).
1821

1922
For Swift 3.2 support, use version [1.12.1](https://github.com/kasketis/netfox/releases/tag/1.12.1).
2023

@@ -26,6 +29,14 @@ Feel free to contribute :)
2629

2730
## Installation
2831

32+
### SPM (beta, only iOS)
33+
34+
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.
35+
36+
To add `netfox` as a package dependency to your Xcode project, select `File > Add Packages` and enter as repository URL the `https://github.com/kasketis/netfox` (always choose the latest release)
37+
38+
For more info, please check [here](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)
39+
2940
### CocoaPods
3041

3142
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. To integrate netfox into your Xcode project using CocoaPods, specify it in your `Podfile`:
@@ -49,8 +60,6 @@ pod 'netfox', :configurations => ['Debug', 'Test']
4960
<pre>
5061
github "kasketis/netfox"
5162
</pre>
52-
53-
5463
### Manually
5564

5665
If you prefer not to use dependency managers, you can integrate netfox into your project manually.

netfox-info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundleVersion</key>
2222
<string>$(CURRENT_PROJECT_VERSION)</string>
2323
<key>Copyright (human-readable)</key>
24-
<string>Copyright © 2016 netfox. All rights reserved.</string>
24+
<string>Copyright © 2016-2021 netfox. All rights reserved.</string>
2525
<key>NSPrincipalClass</key>
2626
<string></string>
2727
</dict>

netfox.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "netfox"
3-
s.version = "1.19.0"
3+
s.version = "1.20.0"
44
s.summary = "A lightweight, one line setup, iOS/OSX network debugging library!"
55

66
s.description = <<-DESC
@@ -12,11 +12,11 @@ DESC
1212
s.license = 'MIT'
1313
s.author = "Christos Kasketis"
1414
s.source = { :git => "https://github.com/kasketis/netfox.git", :tag => "#{s.version}" }
15-
15+
s.swift_versions = '5.0'
1616
s.ios.deployment_target = '9.0'
1717
s.osx.deployment_target = '10.11'
1818
s.requires_arc = true
19-
s.source_files = "netfox/Core/*.{swift,h,m}"
19+
s.source_files = "netfox/Core/*.{swift}"
2020
s.ios.source_files = "netfox/iOS/*.swift"
2121
s.osx.source_files = "netfox/OSX/*.{swift,xib}"
2222
end

netfox.xcodeproj/project.pbxproj

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@
1111
3708AD5A22D4A9DD0050DB7D /* NFXURLDetailsControllerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3708AD5922D4A9DD0050DB7D /* NFXURLDetailsControllerViewController.swift */; };
1212
8201A39D204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8201A39C204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift */; };
1313
8201A39E204E451900AB2C3D /* NFXAuthenticationChallengeSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8201A39C204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift */; };
14-
8201A39F204E452200AB2C3D /* NFXLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 826C4E9D1F979AB3008B440C /* NFXLoader.m */; };
1514
8229AD651F8FB34300A9D613 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8229AD641F8FB34300A9D613 /* AppDelegate.swift */; };
1615
8229AD671F8FB34300A9D613 /* ImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8229AD661F8FB34300A9D613 /* ImageViewController.swift */; };
1716
8229AD6A1F8FB34300A9D613 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8229AD681F8FB34300A9D613 /* Main.storyboard */; };
1817
8229AD6C1F8FB34300A9D613 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8229AD6B1F8FB34300A9D613 /* Assets.xcassets */; };
1918
8229AD6F1F8FB34300A9D613 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8229AD6D1F8FB34300A9D613 /* LaunchScreen.storyboard */; };
2019
8229AD771F8FB4B500A9D613 /* netfox_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3BC020F1C09CDA000C17F3A /* netfox_ios.framework */; };
21-
826C4E9E1F979AB3008B440C /* NFXLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 826C4E9C1F979AB3008B440C /* NFXLoader.h */; };
22-
826C4E9F1F979AB3008B440C /* NFXLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 826C4E9D1F979AB3008B440C /* NFXLoader.m */; };
2320
82F6E1031F8FD81C002B31BD /* TextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F6E1021F8FD81C002B31BD /* TextViewController.swift */; };
2421
82F6E1051F8FF55D002B31BD /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F6E1041F8FF55D002B31BD /* WebViewController.swift */; };
2522
B3F8BA821C833ABC00F9FBEA /* NFX.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA711C833ABC00F9FBEA /* NFX.swift */; };
@@ -96,8 +93,6 @@
9693
8229AD6B1F8FB34300A9D613 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9794
8229AD6E1F8FB34300A9D613 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9895
8229AD701F8FB34300A9D613 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
99-
826C4E9C1F979AB3008B440C /* NFXLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NFXLoader.h; sourceTree = "<group>"; };
100-
826C4E9D1F979AB3008B440C /* NFXLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NFXLoader.m; sourceTree = "<group>"; };
10196
82F6E1021F8FD81C002B31BD /* TextViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextViewController.swift; sourceTree = "<group>"; };
10297
82F6E1041F8FF55D002B31BD /* WebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewController.swift; sourceTree = "<group>"; };
10398
B3BC020F1C09CDA000C17F3A /* netfox_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = netfox_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -210,8 +205,6 @@
210205
B3F8BA701C833ABC00F9FBEA /* Core */ = {
211206
isa = PBXGroup;
212207
children = (
213-
826C4E9C1F979AB3008B440C /* NFXLoader.h */,
214-
826C4E9D1F979AB3008B440C /* NFXLoader.m */,
215208
B3F8BA711C833ABC00F9FBEA /* NFX.swift */,
216209
B3F8BA721C833ABC00F9FBEA /* NFXAssets.swift */,
217210
8201A39C204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift */,
@@ -283,7 +276,6 @@
283276
isa = PBXHeadersBuildPhase;
284277
buildActionMask = 2147483647;
285278
files = (
286-
826C4E9E1F979AB3008B440C /* NFXLoader.h in Headers */,
287279
);
288280
runOnlyForDeploymentPostprocessing = 0;
289281
};
@@ -460,7 +452,6 @@
460452
B3F8BA9E1C833ABC00F9FBEA /* NFXSettingsController.swift in Sources */,
461453
B3F8BAA21C833ABC00F9FBEA /* NFXWindowController.swift in Sources */,
462454
B3F8BA841C833ABC00F9FBEA /* NFXAssets.swift in Sources */,
463-
826C4E9F1F979AB3008B440C /* NFXLoader.m in Sources */,
464455
B3F8BA8C1C833ABC00F9FBEA /* NFXGenericController.swift in Sources */,
465456
B3F8BA921C833ABC00F9FBEA /* NFXHTTPModelManager.swift in Sources */,
466457
B3F8BA881C833ABC00F9FBEA /* NFXDetailsController.swift in Sources */,
@@ -477,7 +468,6 @@
477468
isa = PBXSourcesBuildPhase;
478469
buildActionMask = 2147483647;
479470
files = (
480-
8201A39F204E452200AB2C3D /* NFXLoader.m in Sources */,
481471
8201A39E204E451900AB2C3D /* NFXAuthenticationChallengeSender.swift in Sources */,
482472
B3F8BA831C833ABC00F9FBEA /* NFX.swift in Sources */,
483473
B3F8D67E1C833B1700F9FBEA /* NFXListCell_OSX.swift in Sources */,
@@ -718,7 +708,7 @@
718708
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
719709
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
720710
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
721-
MARKETING_VERSION = 1.18.0;
711+
MARKETING_VERSION = 1.20.0;
722712
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-iOS";
723713
PRODUCT_NAME = "$(TARGET_NAME)";
724714
SKIP_INSTALL = YES;
@@ -740,7 +730,7 @@
740730
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
741731
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
742732
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
743-
MARKETING_VERSION = 1.18.0;
733+
MARKETING_VERSION = 1.20.0;
744734
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-iOS";
745735
PRODUCT_NAME = "$(TARGET_NAME)";
746736
SKIP_INSTALL = YES;
@@ -768,12 +758,13 @@
768758
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
769759
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
770760
MACOSX_DEPLOYMENT_TARGET = 10.11;
761+
MARKETING_VERSION = 1.20.0;
771762
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-OSX";
772763
PRODUCT_NAME = "$(TARGET_NAME)";
773764
SDKROOT = macosx;
774765
SKIP_INSTALL = YES;
775766
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
776-
SWIFT_VERSION = 4.0;
767+
SWIFT_VERSION = 5.0;
777768
};
778769
name = Debug;
779770
};
@@ -793,11 +784,12 @@
793784
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
794785
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
795786
MACOSX_DEPLOYMENT_TARGET = 10.11;
787+
MARKETING_VERSION = 1.20.0;
796788
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-OSX";
797789
PRODUCT_NAME = "$(TARGET_NAME)";
798790
SDKROOT = macosx;
799791
SKIP_INSTALL = YES;
800-
SWIFT_VERSION = 4.0;
792+
SWIFT_VERSION = 5.0;
801793
};
802794
name = Release;
803795
};

0 commit comments

Comments
 (0)