Skip to content

Commit

Permalink
Merge pull request #8 from IntrepidPursuits/ctan/swift-42
Browse files Browse the repository at this point in the history
Update to Swift 4.2 syntax
  • Loading branch information
tzm41 authored Mar 27, 2019
2 parents 4d5c471 + b6f716c commit 957a9a3
Show file tree
Hide file tree
Showing 94 changed files with 2,006 additions and 3,326 deletions.
42 changes: 27 additions & 15 deletions Example/IPDatePicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0820;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
Expand Down Expand Up @@ -268,20 +268,18 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-IPDatePicker_Tests/Pods-IPDatePicker_Tests-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-IPDatePicker_Tests/Pods-IPDatePicker_Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/IP-UIKit-Wisdom/IP_UIKit_Wisdom.framework",
"${BUILT_PRODUCTS_DIR}/Intrepid/Intrepid.framework",
"${BUILT_PRODUCTS_DIR}/FBSnapshotTestCase/FBSnapshotTestCase.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IP_UIKit_Wisdom.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Intrepid.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSnapshotTestCase.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IPDatePicker_Tests/Pods-IPDatePicker_Tests-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IPDatePicker_Tests/Pods-IPDatePicker_Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
8C01D6188C08FEB89E5A4760 /* [CP] Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -326,7 +324,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-IPDatePicker_Example/Pods-IPDatePicker_Example-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-IPDatePicker_Example/Pods-IPDatePicker_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/IP-UIKit-Wisdom/IP_UIKit_Wisdom.framework",
"${BUILT_PRODUCTS_DIR}/IPDatePicker/IPDatePicker.framework",
"${BUILT_PRODUCTS_DIR}/Intrepid/Intrepid.framework",
Expand All @@ -341,7 +339,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IPDatePicker_Example/Pods-IPDatePicker_Example-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IPDatePicker_Example/Pods-IPDatePicker_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -402,14 +400,22 @@
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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 All @@ -433,12 +439,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -450,14 +456,22 @@
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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 All @@ -474,11 +488,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -493,7 +507,6 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -507,7 +520,6 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -524,7 +536,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 = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IPDatePicker_Example.app/IPDatePicker_Example";
};
name = Debug;
};
Expand All @@ -537,7 +549,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 = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IPDatePicker_Example.app/IPDatePicker_Example";
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
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 = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Example/IPDatePicker/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
8 changes: 4 additions & 4 deletions Example/IPDatePicker/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ class ViewController: UIViewController, IPDatePickerDelegate {
simplifiedChineseButton.addTarget(self, action: #selector(didPressSimplifiedChinese), for: .touchUpInside)

view.addSubview(stack)
stack.autoPinEdgesToSuperviewEdges(with: UIEdgeInsetsMake(0.0, 40.0, 40.0, 40.0), excludingEdge: .top)
stack.autoPinEdgesToSuperviewEdges(with: UIEdgeInsets(top: 0.0, left: 40.0, bottom: 40.0, right: 40.0), excludingEdge: .top)
}

private dynamic func didPressEnglish() {
@objc private func didPressEnglish() {
let locale = Locale(identifier: "en")
setupPickerWithLocale(locale)
}

private dynamic func didPressSimplifiedChinese() {
@objc private func didPressSimplifiedChinese() {
let locale = Locale(identifier: "zh")
setupPickerWithLocale(locale)
}
Expand All @@ -70,7 +70,7 @@ class ViewController: UIViewController, IPDatePickerDelegate {
}

let attributes = [
NSForegroundColorAttributeName: UIColor.blue
NSAttributedString.Key.foregroundColor: UIColor.blue
]
return NSAttributedString(string: suggestedSymbol, attributes: attributes)
}
Expand Down
11 changes: 9 additions & 2 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ target 'IPDatePicker_Example' do
target 'IPDatePicker_Tests' do
inherit! :search_paths

pod 'FBSnapshotTestCase'
pod 'Intrepid', '~> 0.8'
pod 'Intrepid', '~> 0.12'
end
end

post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
end
end
32 changes: 12 additions & 20 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
PODS:
- FBSnapshotTestCase (2.1.4):
- FBSnapshotTestCase/SwiftSupport (= 2.1.4)
- FBSnapshotTestCase/Core (2.1.4)
- FBSnapshotTestCase/SwiftSupport (2.1.4):
- FBSnapshotTestCase/Core
- Intrepid (0.8.4):
- Intrepid/Core (= 0.8.4)
- Intrepid/Core (0.8.4):
- Intrepid (0.12.0):
- Intrepid/Core (= 0.12.0)
- Intrepid/Core (0.12.0):
- IP-UIKit-Wisdom (= 0.0.10)
- IP-UIKit-Wisdom (0.0.10)
- IPDatePicker (0.6.0):
- IPDatePicker (0.7.0):
- Intrepid
- PureLayout
- PureLayout (3.0.2)
- PureLayout (3.1.4)

DEPENDENCIES:
- FBSnapshotTestCase
- Intrepid (~> 0.8)
- Intrepid (~> 0.12)
- IPDatePicker (from `../`)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- FBSnapshotTestCase
https://github.com/cocoapods/specs.git:
- Intrepid
- IP-UIKit-Wisdom
- PureLayout
Expand All @@ -31,12 +24,11 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a
Intrepid: e40c48e968728cf2e04beb4bd811a03173e86172
Intrepid: 07fd9de542a68b98f24b0a20c6e59be5f21ce9dd
IP-UIKit-Wisdom: b395a065344071b33659e5f6b918043a97c48a44
IPDatePicker: 3ec22d0fd101505359626464730f2edf9d1bd10e
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
IPDatePicker: 4de3babf2a0c7d53e8de627526b91c3bb9ffcfb8
PureLayout: f08c01b8dec00bb14a1fefa3de4c7d9c265df85e

PODFILE CHECKSUM: 4c1193e4c5eed1ac79c4edeb0f482415ccb15877
PODFILE CHECKSUM: aa932f6be0726423dd6b6592018d236cf5d9088e

COCOAPODS: 1.5.0
COCOAPODS: 1.6.1

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 957a9a3

Please sign in to comment.