Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
kof.kofktu committed Sep 27, 2017
2 parents e373ec1 + f09b68e commit cc8c10a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
4.0
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

## Requirements
- iOS 8.0+, macOS 10.9+, watchOS 2.0+, tvOS 9.0+
- Swift 3.0
- Swift 4.0
- Swift 3.0 ([1.0.6](https://github.com/Kofktu/Sniffer/tree/1.0.6))

## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
Expand Down
2 changes: 1 addition & 1 deletion Sniffer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "Sniffer"
s.version = "1.0.6"
s.version = "1.5.0"
s.summary = "Automatic network activity logger for Swift"
s.homepage = "https://github.com/Kofktu/Sniffer"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
Expand Down
8 changes: 4 additions & 4 deletions Sniffer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -405,7 +405,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.kofktu.Sniffer;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -418,7 +418,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.kofktu.SnifferTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -431,7 +431,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.kofktu.SnifferTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
8 changes: 6 additions & 2 deletions Sniffer/Classes/BodyDeserializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ public final class JSONBodyDeserializer: BodyDeserializer {
public final class HTMLBodyDeserializer: BodyDeserializer {
public func deserialize(body: Data) -> String? {
do {
let attr = NSMutableAttributedString()
attr.append(try NSAttributedString(data: body, options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType], documentAttributes: nil))
let attr = try NSAttributedString(
data: body,
options: [NSAttributedString.DocumentReadingOptionKey.documentType : NSAttributedString.DocumentType.html,
NSAttributedString.DocumentReadingOptionKey.characterEncoding: String.Encoding.utf8.rawValue
],
documentAttributes: nil)
return attr.string
} catch {
return nil
Expand Down
2 changes: 1 addition & 1 deletion Sniffer/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.6</string>
<string>1.5.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit cc8c10a

Please sign in to comment.