Skip to content

Commit

Permalink
Merge pull request #4 from Gray-Wind/master
Browse files Browse the repository at this point in the history
Update for Swift 5.0
  • Loading branch information
mkj-is authored Oct 17, 2019
2 parents 171f403 + d2e7436 commit 72be24c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions Example/TFBubbleItUp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 1110;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 1110;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
Expand Down Expand Up @@ -541,7 +543,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -556,7 +558,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -577,7 +579,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TFBubbleItUp_Example.app/TFBubbleItUp_Example";
};
name = Debug;
Expand All @@ -595,7 +597,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TFBubbleItUp_Example.app/TFBubbleItUp_Example";
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions Pod/Classes/TFBubbleItUpView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ enum DataSourceOperationError: Error {
let item = self.items.last,
!validator(item.text) {

let position = self.items.index(where: { (i) -> Bool in i.text == item.text })
let position = self.items.firstIndex { (i) -> Bool in i.text == item.text }

// Force try because we know that this position exists
try! self.replaceItemsTextAtPosition(position: position!, withText: text) {
Expand Down Expand Up @@ -216,7 +216,7 @@ enum DataSourceOperationError: Error {
}

public func removeStringItem(text: String) -> Bool {
let index = self.items.index { (item) -> Bool in item.text == text }
let index = self.items.firstIndex { (item) -> Bool in item.text == text }

guard let i = index else {

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static var itemValidation: Validation? = nil

## Requirements

TFBubbleItUp uses Swift 4.2. Target deployment iOS 10.0 and higher.
TFBubbleItUp uses Swift 5.0. Target deployment iOS 10.0 and higher.

## Installation

Expand Down
6 changes: 3 additions & 3 deletions TFBubbleItUp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "TFBubbleItUp"
s.version = "1.5.1"
s.version = "2.0.0"
s.summary = "Text field with bubbles and ability of validation"

# This description is used to generate tags and improve search results.
Expand All @@ -27,9 +27,9 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/thefuntasty/TFBubbleItUp.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.platform = :ios, '8.0'
s.platform = :ios, '10.0'
s.requires_arc = true
s.swift_version = '4.2'
s.swift_version = '5.0'

s.source_files = 'Pod/Classes/**/*'
s.resource_bundles = {
Expand Down

0 comments on commit 72be24c

Please sign in to comment.