Skip to content

Commit

Permalink
[Swift] Update to Swift 5.0 (#145)
Browse files Browse the repository at this point in the history
* [Swift] Update to Swift 5.0

* [Swift] Update README

* [CI] Update travis to Xcode 10.2
  • Loading branch information
iwasrobbed authored Apr 26, 2019
1 parent c0660dc commit 49b3eba
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
5.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode10.1
osx_image: xcode10.2
language: objective-c
before_install:
- set -o pipefail
Expand Down
13 changes: 6 additions & 7 deletions Down-Example/Down-Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
14090A482185411800503C06 = {
CreatedOnToolsVersion = 10.0;
DevelopmentTeam = NWN7H36NTR;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Sandbox = {
Expand All @@ -253,7 +254,7 @@
};
8A07D7CE1F085EC6004D7141 = {
CreatedOnToolsVersion = 8.3.3;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
};
};
};
Expand Down Expand Up @@ -407,7 +408,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.glazeddonut.macOS-Demo";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -432,7 +433,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.glazeddonut.macOS-Demo";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down Expand Up @@ -567,8 +568,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.glazeddonut.Down-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -588,8 +588,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.glazeddonut.Down-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions Down.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|
spec.name = "Down"
spec.summary = "Blazing fast Markdown rendering in Swift, built upon cmark."
spec.version = "0.8.0"
spec.version = "0.8.1"
spec.homepage = "https://github.com/iwasrobbed/Down"
spec.license = { :type => "MIT", :file => "LICENSE" }
spec.authors = { "Rob Phillips" => "[email protected]" }
Expand All @@ -20,5 +20,5 @@ Pod::Spec.new do |spec|
spec.compiler_flags = '-Wno-shorten-64-to-32'
spec.ios.resource = 'Resources/DownView.bundle'
spec.osx.resource = 'Resources/DownView.bundle'
spec.swift_version = "4.0"
spec.swift_version = "5.0"
end
12 changes: 4 additions & 8 deletions Down.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "${SRCROOT}/Source/cmark";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -757,8 +756,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "${SRCROOT}/Source/cmark";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -768,8 +766,7 @@
buildSettings = {
INFOPLIST_FILE = "Resources/DownTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.glazeddonut.DownTests;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -779,8 +776,7 @@
buildSettings = {
INFOPLIST_FILE = "Resources/DownTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.glazeddonut.DownTests;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Build Status](https://travis-ci.org/iwasrobbed/Down.svg?branch=master)](https://travis-ci.org/iwasrobbed/Down)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/iwasrobbed/Down/blob/master/LICENSE)
[![CocoaPods](https://img.shields.io/cocoapods/v/Down.svg?maxAge=10800)]()
[![Swift 4](https://img.shields.io/badge/language-Swift-blue.svg)](https://swift.org)
[![Swift 5](https://img.shields.io/badge/language-Swift-blue.svg)](https://swift.org)
[![macOS](https://img.shields.io/badge/OS-macOS-orange.svg)](https://developer.apple.com/macos/)
[![iOS](https://img.shields.io/badge/OS-iOS-orange.svg)](https://developer.apple.com/ios/)
[![tvOS](https://img.shields.io/badge/OS-tvOS-orange.svg)](https://developer.apple.com/tvos/)
Expand All @@ -25,7 +25,7 @@ Is your app using it? [Let us know!](mailto:[email protected])

### Installation

Note: Swift 4 support is now on the `master` branch and any tag >= 0.4.x (Swift 3 is 0.3.x)
Note: Swift 5 support is now on the `master` branch and any tag >= 0.8.1 (Swift 4 is >= 0.4.x, Swift 3 is 0.3.x)

Quickly install using [CocoaPods](https://cocoapods.org):

Expand Down
2 changes: 1 addition & 1 deletion Source/AST/Stylers/Styler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ public protocol Styler {
func style(link str: NSMutableAttributedString, title: String?, url: String?)
func style(image str: NSMutableAttributedString, title: String?, url: String?)

var listPrefixAttributes: [NSAttributedStringKey: Any] { get }
var listPrefixAttributes: [NSAttributedString.Key: Any] { get }
}
2 changes: 1 addition & 1 deletion Tests/VisitorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class VisitorTests: XCTestCase {
}

private class EmptyStyler: Styler {
var listPrefixAttributes: [NSAttributedStringKey : Any] = [:]
var listPrefixAttributes: [NSAttributedString.Key : Any] = [:]
func style(document str: NSMutableAttributedString) {}
func style(blockQuote str: NSMutableAttributedString) {}
func style(list str: NSMutableAttributedString) {}
Expand Down

0 comments on commit 49b3eba

Please sign in to comment.