Skip to content

Commit

Permalink
Swift 4 Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
malcommac committed Sep 14, 2017
1 parent bb34f34 commit 2b3c854
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 13 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
4.0
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@

## CHANGELOG

* Version **[1.0.0](#100)**
* Version **[0.9.0](#090)**

<a name="100" />

## SwiftMsgPack 1.0.0
---
- **Release Date**: 2017/09/14
- **Zipped Version**: [Download 1.0.0](https://github.com/malcommac/SwiftMsgPack/releases/tag/1.0.0)

Swift 4 compatible version

<a name="090" />

## SwiftMsgPack 0.9.0
---
- **Release Date**: 2017/02/26
- **Zipped Version**: [Download 0.9.0](https://github.com/malcommac/SwiftMsgPack/releases/tag/0.9.0)

First release
First release
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Take a look here:

## Current Release

Latest release is: 0.9.1 [Download here](https://github.com/malcommac/SwiftMsgPack/releases/tag/0.9.1).
* **Swift 4.x**: Latest is 1.0.0 [Download here](https://github.com/malcommac/SwiftMsgPack/releases/tag/1.0.0).
* **Swift 3.x**: Last is 0.9.1 [Download here](https://github.com/malcommac/SwiftMsgPack/releases/tag/0.9.1).

A complete list of changes for each release is available in the [CHANGELOG](CHANGELOG.md) file.

<a name="howto" />
Expand Down Expand Up @@ -136,7 +138,7 @@ Tests can also be runned with XCode using the SwiftMsgPack project.

Current version is compatible with:

* Swift 3.0+
* Swift 4.x+ (Swift 3.x up to 0.9.1)
* iOS 9.0 or later
* tvOS 9.0 or later
* macOS 10.10 or later
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftMsgPack/Decoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ public extension Data {
// STRING 32 BIT LENGTH
// str 32 11011011 0xdb
case 0xdb:
let len_data = Int(try stream.read8Bit()) << 24 +
Int(try stream.read8Bit()) << 16 +
Int(try stream.read8Bit()) << 8 +
Int(try stream.read8Bit())
var len_data = Int(try stream.read8Bit()) << 24
len_data += Int(try stream.read8Bit()) << 16
len_data += Int(try stream.read8Bit()) << 8
len_data += Int(try stream.read8Bit())
return try unpack(string: &stream, length: len_data)


Expand Down
2 changes: 1 addition & 1 deletion SwiftMsgPack.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'SwiftMsgPack'
spec.version = '0.9.1'
spec.version = '1.0.0'
spec.summary = 'MsgPack Encoder/Decoder in pure Swift'
spec.homepage = 'https://github.com/malcommac/SwiftMsgPack'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
10 changes: 6 additions & 4 deletions SwiftMsgPack/SwiftMsgPack.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -354,6 +355,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -382,7 +384,7 @@
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -407,7 +409,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Release;
Expand All @@ -423,7 +425,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mokasw.SwiftMsgPackTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -437,7 +439,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mokasw.SwiftMsgPackTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Binary file not shown.

0 comments on commit 2b3c854

Please sign in to comment.