Skip to content

Commit

Permalink
Merge pull request #220 from kasketis/develop
Browse files Browse the repository at this point in the history
Refactor, SPM support and exclude URLs based on a regex
  • Loading branch information
vGubriienko authored Dec 6, 2021
2 parents 92dbe40 + cd73205 commit 879a3ed
Show file tree
Hide file tree
Showing 42 changed files with 918 additions and 1,071 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
*.xcuserdatad
.swiftpm

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

Expand Down
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

22 changes: 22 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version:5.3

import PackageDescription

let package = Package(
name: "netfox",
platforms: [
.iOS(.v9)
],
products: [
.library(
name: "netfox",
targets: ["netfox"]
),
],
targets: [
.target(name: "netfox",
path: "netfox/",
exclude: ["OSX"])
],
swiftLanguageVersions: [.v5]
)
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
![Netfox: A lightweight, one line setup, network debugging library](https://raw.githubusercontent.com/kasketis/netfox/master/netfox-logo.png)

<p align="center">
<img alt="Version" src="https://img.shields.io/badge/version-1.11-green.svg?style=flat-square" />
<img alt="Version" src="https://img.shields.io/badge/version-1.20.0-green.svg?style=flat-square" />
<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>
<a href="https://cocoapods.org/pods/netfox"><img alt="Cocoapods Compatible" src="https://img.shields.io/cocoapods/v/netfox.svg?style=flat-square" /></a>
<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>
<img alt="Platform" src="https://img.shields.io/cocoapods/p/netfox.svg?style=flat-square" />
<a href="https://opensource.org/licenses/MIT"><img alt="License" src="https://img.shields.io/badge/license-MIT-orange.svg?style=flat-square" /></a>
</p>


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

Very useful and handy for network related issues and bugs

Supports Swift 4 and above - bridged also for Objective-C.
Supports Swift 5 and above - bridged also for Objective-C.

For Swift 4 support, use version [1.19.0](https://github.com/kasketis/netfox/releases/tag/1.19.0).

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

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

## Installation

### SPM (beta, only iOS)

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.

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)

For more info, please check [here](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)

### CocoaPods

[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`:
Expand All @@ -49,8 +60,6 @@ pod 'netfox', :configurations => ['Debug', 'Test']
<pre>
github "kasketis/netfox"
</pre>


### Manually

If you prefer not to use dependency managers, you can integrate netfox into your project manually.
Expand Down
2 changes: 1 addition & 1 deletion netfox-info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>Copyright (human-readable)</key>
<string>Copyright © 2016 netfox. All rights reserved.</string>
<string>Copyright © 2016-2021 netfox. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down
6 changes: 3 additions & 3 deletions netfox.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "netfox"
s.version = "1.19.0"
s.version = "1.20.0"
s.summary = "A lightweight, one line setup, iOS/OSX network debugging library!"

s.description = <<-DESC
Expand All @@ -12,11 +12,11 @@ DESC
s.license = 'MIT'
s.author = "Christos Kasketis"
s.source = { :git => "https://github.com/kasketis/netfox.git", :tag => "#{s.version}" }

s.swift_versions = '5.0'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.11'
s.requires_arc = true
s.source_files = "netfox/Core/*.{swift,h,m}"
s.source_files = "netfox/Core/*.{swift}"
s.ios.source_files = "netfox/iOS/*.swift"
s.osx.source_files = "netfox/OSX/*.{swift,xib}"
end
20 changes: 6 additions & 14 deletions netfox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@
3708AD5A22D4A9DD0050DB7D /* NFXURLDetailsControllerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3708AD5922D4A9DD0050DB7D /* NFXURLDetailsControllerViewController.swift */; };
8201A39D204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8201A39C204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift */; };
8201A39E204E451900AB2C3D /* NFXAuthenticationChallengeSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8201A39C204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift */; };
8201A39F204E452200AB2C3D /* NFXLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 826C4E9D1F979AB3008B440C /* NFXLoader.m */; };
8229AD651F8FB34300A9D613 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8229AD641F8FB34300A9D613 /* AppDelegate.swift */; };
8229AD671F8FB34300A9D613 /* ImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8229AD661F8FB34300A9D613 /* ImageViewController.swift */; };
8229AD6A1F8FB34300A9D613 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8229AD681F8FB34300A9D613 /* Main.storyboard */; };
8229AD6C1F8FB34300A9D613 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8229AD6B1F8FB34300A9D613 /* Assets.xcassets */; };
8229AD6F1F8FB34300A9D613 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8229AD6D1F8FB34300A9D613 /* LaunchScreen.storyboard */; };
8229AD771F8FB4B500A9D613 /* netfox_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3BC020F1C09CDA000C17F3A /* netfox_ios.framework */; };
826C4E9E1F979AB3008B440C /* NFXLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 826C4E9C1F979AB3008B440C /* NFXLoader.h */; };
826C4E9F1F979AB3008B440C /* NFXLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 826C4E9D1F979AB3008B440C /* NFXLoader.m */; };
82F6E1031F8FD81C002B31BD /* TextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F6E1021F8FD81C002B31BD /* TextViewController.swift */; };
82F6E1051F8FF55D002B31BD /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F6E1041F8FF55D002B31BD /* WebViewController.swift */; };
B3F8BA821C833ABC00F9FBEA /* NFX.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA711C833ABC00F9FBEA /* NFX.swift */; };
Expand Down Expand Up @@ -96,8 +93,6 @@
8229AD6B1F8FB34300A9D613 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8229AD6E1F8FB34300A9D613 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
8229AD701F8FB34300A9D613 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
826C4E9C1F979AB3008B440C /* NFXLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NFXLoader.h; sourceTree = "<group>"; };
826C4E9D1F979AB3008B440C /* NFXLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NFXLoader.m; sourceTree = "<group>"; };
82F6E1021F8FD81C002B31BD /* TextViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextViewController.swift; sourceTree = "<group>"; };
82F6E1041F8FF55D002B31BD /* WebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewController.swift; sourceTree = "<group>"; };
B3BC020F1C09CDA000C17F3A /* netfox_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = netfox_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -210,8 +205,6 @@
B3F8BA701C833ABC00F9FBEA /* Core */ = {
isa = PBXGroup;
children = (
826C4E9C1F979AB3008B440C /* NFXLoader.h */,
826C4E9D1F979AB3008B440C /* NFXLoader.m */,
B3F8BA711C833ABC00F9FBEA /* NFX.swift */,
B3F8BA721C833ABC00F9FBEA /* NFXAssets.swift */,
8201A39C204E3E3F00AB2C3D /* NFXAuthenticationChallengeSender.swift */,
Expand Down Expand Up @@ -283,7 +276,6 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
826C4E9E1F979AB3008B440C /* NFXLoader.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -460,7 +452,6 @@
B3F8BA9E1C833ABC00F9FBEA /* NFXSettingsController.swift in Sources */,
B3F8BAA21C833ABC00F9FBEA /* NFXWindowController.swift in Sources */,
B3F8BA841C833ABC00F9FBEA /* NFXAssets.swift in Sources */,
826C4E9F1F979AB3008B440C /* NFXLoader.m in Sources */,
B3F8BA8C1C833ABC00F9FBEA /* NFXGenericController.swift in Sources */,
B3F8BA921C833ABC00F9FBEA /* NFXHTTPModelManager.swift in Sources */,
B3F8BA881C833ABC00F9FBEA /* NFXDetailsController.swift in Sources */,
Expand All @@ -477,7 +468,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8201A39F204E452200AB2C3D /* NFXLoader.m in Sources */,
8201A39E204E451900AB2C3D /* NFXAuthenticationChallengeSender.swift in Sources */,
B3F8BA831C833ABC00F9FBEA /* NFX.swift in Sources */,
B3F8D67E1C833B1700F9FBEA /* NFXListCell_OSX.swift in Sources */,
Expand Down Expand Up @@ -718,7 +708,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.18.0;
MARKETING_VERSION = 1.20.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -740,7 +730,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.18.0;
MARKETING_VERSION = 1.20.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -768,12 +758,13 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 1.20.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -793,11 +784,12 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 1.20.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.kasketis.netfox-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Loading

0 comments on commit 879a3ed

Please sign in to comment.