Skip to content

Commit

Permalink
Merge pull request #69 from ustwo/v3_0
Browse files Browse the repository at this point in the history
Version 3.0.0
  • Loading branch information
Aaron McTavish authored Feb 8, 2018
2 parents e9a9614 + ef7919f commit dffa6b1
Show file tree
Hide file tree
Showing 155 changed files with 4,227 additions and 3,866 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1
4.1
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ opt_in_rules:
- redundant_nil_coalescing
- sorted_imports
- switch_case_on_newline
- yoda_condition

excluded:
- Pods
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode8.3
osx_image: xcode9.2
language: objective-c

env:
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
All notable changes to this project will be documented in this file.
`FormValidatorSwift` adheres to [Semantic Versioning](http://semver.org/).

#### 1.x Releases
#### 3.x Releases
- `3.0.x` Releases - [3.0.0](#300)

#### 2.x Releases
- `2.0.x` Releases - [2.0.0](#200)

#### 1.x Releases
- `1.2.x` Releases - [1.2.0](#120)
- `1.1.x` Releases - [1.1.0](#110)
- `1.0.x` Releases - [1.0.0](#100)
Expand All @@ -25,6 +30,23 @@ All notable changes to this project will be documented in this file.

- None.

## [3.0.0](https://github.com/ustwo/formvalidator-swift/releases/tag/v3.0.0)

##### Breaking

- Renamed `PostcodeCountries` enum cases to begin with lower case letter.
- Updated by [Aaron McTavish](https://github.com/aamctustwo) in Pull Request [#68](https://github.com/ustwo/formvalidator-swift/pull/68).
- Updated to Swift 4.1 (and added Xcode 9.x support).
- Updated by [Aaron McTavish](https://github.com/aamctustwo) in Pull Request [#65](https://github.com/ustwo/formvalidator-swift/pull/65) and Pull Request [#67](https://github.com/ustwo/formvalidator-swift/pull/67).

##### Added

- None.

##### Updated

- None.

## [2.0.0](https://github.com/ustwo/formvalidator-swift/releases/tag/v2.0.0)

#### Breaking
Expand Down
4 changes: 2 additions & 2 deletions Example/iOS/FormView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ final class FormView: UIView {
submitButton.setTitle(NSLocalizedString("Submit", comment: ""), for: UIControlState())
stackView.addArrangedSubview(submitButton)

bottomBufferView.setContentCompressionResistancePriority(UILayoutPriorityDefaultLow, for: stackView.axis)
bottomBufferView.setContentHuggingPriority(UILayoutPriorityDefaultLow, for: stackView.axis)
bottomBufferView.setContentCompressionResistancePriority(UILayoutPriority.defaultLow, for: stackView.axis)
bottomBufferView.setContentHuggingPriority(UILayoutPriority.defaultLow, for: stackView.axis)
stackView.addArrangedSubview(bottomBufferView)


Expand Down
2 changes: 1 addition & 1 deletion Example/iOS/FormViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class FormViewController: UIViewController {

// MARK: - Control Actions

func submitButtonPressed(_ sender: UIButton) {
@objc func submitButtonPressed(_ sender: UIButton) {
let alertTitle: String
let alertMessage: String
if form.isValid {
Expand Down
2 changes: 1 addition & 1 deletion Example/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>3.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
6 changes: 3 additions & 3 deletions Example/macOS/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
lazy var window: NSWindow = {
let result = NSWindow(contentRect: NSRect(x: 0,
y: 0,
width: NSScreen.main()!.frame.width / 2.0,
height: NSScreen.main()!.frame.height / 2.0),
styleMask: [.titled, .miniaturizable, .resizable, .closable],
width: NSScreen.main!.frame.width / 2.0,
height: NSScreen.main!.frame.height / 2.0),
styleMask: [NSWindow.StyleMask.titled, NSWindow.StyleMask.miniaturizable, NSWindow.StyleMask.resizable, NSWindow.StyleMask.closable],
backing: .buffered,
defer: false)

Expand Down
4 changes: 2 additions & 2 deletions Example/macOS/FormViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ final class FormViewController: NSViewController {

// MARK: - Control Actions

func submitButtonPressed(_ sender: NSButton) {
@objc func submitButtonPressed(_ sender: NSButton) {
let alertMessage: String
if form.isValid {
alertMessage = NSLocalizedString("Success: Your data has been submitted!", comment: "")
Expand All @@ -61,7 +61,7 @@ final class FormViewController: NSViewController {
alert.alertStyle = .critical
alert.messageText = alertMessage

alert.beginSheetModal(for: NSApplication.shared().mainWindow!, completionHandler: nil)
alert.beginSheetModal(for: NSApplication.shared.mainWindow!, completionHandler: nil)
}

}
2 changes: 1 addition & 1 deletion Example/macOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>3.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion FormValidatorSwift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FormValidatorSwift'
s.version = '2.0.0'
s.version = '3.0.0'
s.license = { :type => "MIT", :file => "License.md" }
s.summary = 'A framework to validate inputs of text fields and text views in a convenient way.'
s.homepage = 'https://github.com/ustwo/formvalidator-swift'
Expand Down
44 changes: 31 additions & 13 deletions FormValidatorSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -817,32 +817,36 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = ustwo;
TargetAttributes = {
0056755E1C47ED32005A43F0 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0910;
};
005675671C47ED32005A43F0 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0910;
ProvisioningStyle = Manual;
};
0062E9CF1C45493E00021C0A = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
LastSwiftMigration = 0910;
};
0062E9D91C45493E00021C0A = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
LastSwiftMigration = 0910;
ProvisioningStyle = Manual;
};
00AC81E71E1FB69200A184BB = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0910;
ProvisioningStyle = Manual;
};
00AC81EF1E1FB69200A184BB = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 4JC5M8RR29;
LastSwiftMigration = 0910;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -1311,7 +1315,7 @@
PRODUCT_NAME = FormValidatorSwift;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
Expand All @@ -1334,7 +1338,7 @@
PRODUCT_NAME = FormValidatorSwift;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
Expand All @@ -1349,6 +1353,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.FormValidatorSwiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 9.1;
};
name = Debug;
Expand All @@ -1362,6 +1367,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.FormValidatorSwiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 9.1;
};
name = Release;
Expand All @@ -1375,14 +1381,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -1428,14 +1440,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -1484,7 +1502,7 @@
PRODUCT_NAME = FormValidatorSwift;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -1505,7 +1523,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.FormValidatorSwift;
PRODUCT_NAME = FormValidatorSwift;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -1517,7 +1535,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.FormValidatorSwiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -1529,7 +1547,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.FormValidatorSwiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -1556,7 +1574,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -1582,7 +1600,7 @@
PRODUCT_NAME = FormValidatorSwift;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -1602,7 +1620,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -1621,7 +1639,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ustwo.FormValidatorSwiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
Expand Down Expand Up @@ -56,6 +57,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
Expand Down Expand Up @@ -56,6 +57,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Loading

0 comments on commit dffa6b1

Please sign in to comment.