diff --git a/.travis.yml b/.travis.yml index 2f29c72..6dadcb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ env: - LANG=en_US.UTF-8 matrix: - DESTINATION="OS=12.0,name=iPhone XS" SDK="iphonesimulator12.0" POD_LINT="YES" SWIFT_LINT="YES" - - DESTINATION="OS=11.4,name=iPhone 8" SDK="iphonesimulator12.0" POD_LINT="YES" SWIFT_LINT="YES" + - DESTINATION="OS=11.4,name=iPhone 8" SDK="iphonesimulator12.0" POD_LINT="NO" SWIFT_LINT="NO" - DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SDK="iphonesimulator12.0" POD_LINT="NO" SWIFT_LINT="NO" - DESTINATION="OS=9.3,name=iPhone 6" SDK="iphonesimulator12.0" POD_LINT="NO" SWIFT_LINT="NO" # - DESTINATION="OS=8.4,name=iPhone 5S" SDK="iphonesimulator12.0" POD_LINT="NO" SWIFT_LINT="NO" diff --git a/Example/McPicker.xcodeproj/project.pbxproj b/Example/McPicker.xcodeproj/project.pbxproj index 81ecb9d..1e73872 100644 --- a/Example/McPicker.xcodeproj/project.pbxproj +++ b/Example/McPicker.xcodeproj/project.pbxproj @@ -174,7 +174,6 @@ 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, C47D12FBF936BCA4F2FC5DF5 /* [CP] Embed Pods Frameworks */, - 973D169A1B9454CE644A8880 /* [CP] Copy Pods Resources */, 7218E36A1F0EA822003423A2 /* ShellScript */, ); buildRules = ( @@ -195,7 +194,6 @@ 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, 48272FBEB2AC4541EBD289D6 /* [CP] Embed Pods Frameworks */, - 9DE3F95F620581BF19411B68 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -214,7 +212,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { @@ -317,36 +315,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 973D169A1B9454CE644A8880 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-McPicker_Example/Pods-McPicker_Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9DE3F95F620581BF19411B68 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-McPicker_Tests/Pods-McPicker_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; C47D12FBF936BCA4F2FC5DF5 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -446,12 +414,14 @@ 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; @@ -484,6 +454,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -499,12 +470,14 @@ 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; @@ -529,6 +502,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; VALIDATE_PRODUCT = YES; }; name = Release; @@ -547,7 +521,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -566,7 +540,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -585,7 +559,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -599,7 +573,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Example/McPicker.xcodeproj/xcshareddata/xcschemes/McPicker-Example.xcscheme b/Example/McPicker.xcodeproj/xcshareddata/xcschemes/McPicker-Example.xcscheme index 559b961..77c8b84 100644 --- a/Example/McPicker.xcodeproj/xcshareddata/xcschemes/McPicker-Example.xcscheme +++ b/Example/McPicker.xcodeproj/xcshareddata/xcschemes/McPicker-Example.xcscheme @@ -1,6 +1,6 @@ Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 1b53539..223952a 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,16 +1,16 @@ PODS: - - McPicker (0.5.2) + - McPicker (2.0.0) DEPENDENCIES: - McPicker (from `../`) EXTERNAL SOURCES: McPicker: - :path: ../ + :path: "../" SPEC CHECKSUMS: - McPicker: 05016caf44615afc93617b9effa4f1648f3223d6 + McPicker: 184bd2403f48f1b69e8384d2dbcd4fcff4c0df5f PODFILE CHECKSUM: 7f68cc3d721452977903943f3af774acc3f68ed4 -COCOAPODS: 1.3.1 +COCOAPODS: 1.5.0 diff --git a/Example/Tests/McPickerBarButtonItemTests.swift b/Example/Tests/McPickerBarButtonItemTests.swift index f9adc81..7b559eb 100644 --- a/Example/Tests/McPickerBarButtonItemTests.swift +++ b/Example/Tests/McPickerBarButtonItemTests.swift @@ -40,7 +40,7 @@ class McPickerBarButtonItemTests: XCTestCase { } func testInitDone_noTitleCustomStyle() { - let item = McPickerBarButtonItem.done(mcPicker: mcPicker, barButtonSystemItem: UIBarButtonSystemItem.save) + let item = McPickerBarButtonItem.done(mcPicker: mcPicker, barButtonSystemItem: UIBarButtonItem.SystemItem.save) XCTAssertNil(item.title) XCTAssertTrue(item.style == .plain) @@ -68,7 +68,7 @@ class McPickerBarButtonItemTests: XCTestCase { } func testInitCancel_noTitleCustomStyle() { - let item = McPickerBarButtonItem.cancel(mcPicker: mcPicker, barButtonSystemItem: UIBarButtonSystemItem.save) + let item = McPickerBarButtonItem.cancel(mcPicker: mcPicker, barButtonSystemItem: UIBarButtonItem.SystemItem.save) XCTAssertNil(item.title) XCTAssertTrue(item.style == .plain) diff --git a/Example/Tests/McPickerTests.swift b/Example/Tests/McPickerTests.swift index eac5b4f..d8cb8a4 100644 --- a/Example/Tests/McPickerTests.swift +++ b/Example/Tests/McPickerTests.swift @@ -230,10 +230,10 @@ class McPickerTests: XCTestCase { // Then // - XCTAssertEqual(expectedFont, cancelBarButton.titleTextAttributes(for: .normal)?[NSAttributedStringKey.font.rawValue] as! UIFont) - XCTAssertEqual(expectedFont, doneBarButton.titleTextAttributes(for: .normal)?[NSAttributedStringKey.font.rawValue] as! UIFont) - XCTAssertEqual(expectedFont, cancelBarButton.titleTextAttributes(for: .selected)?[NSAttributedStringKey.font.rawValue] as! UIFont) - XCTAssertEqual(expectedFont, doneBarButton.titleTextAttributes(for: .selected)?[NSAttributedStringKey.font.rawValue] as! UIFont) + XCTAssertEqual(expectedFont, cancelBarButton.titleTextAttributes(for: .normal)?[NSAttributedString.Key.font] as! UIFont) + XCTAssertEqual(expectedFont, doneBarButton.titleTextAttributes(for: .normal)?[NSAttributedString.Key.font] as! UIFont) + XCTAssertEqual(expectedFont, cancelBarButton.titleTextAttributes(for: .selected)?[NSAttributedString.Key.font] as! UIFont) + XCTAssertEqual(expectedFont, doneBarButton.titleTextAttributes(for: .selected)?[NSAttributedString.Key.font] as! UIFont) } func testSetToolbarItemsFont_afterToolbarItemsSet() { @@ -253,10 +253,10 @@ class McPickerTests: XCTestCase { // Then // - XCTAssertEqual(expectedFont, cancelButton.titleTextAttributes(for: .normal)?[NSAttributedStringKey.font.rawValue] as! UIFont) - XCTAssertEqual(expectedFont, fireButton.titleTextAttributes(for: .normal)?[NSAttributedStringKey.font.rawValue] as! UIFont) - XCTAssertEqual(expectedFont, cancelButton.titleTextAttributes(for: .selected)?[NSAttributedStringKey.font.rawValue] as! UIFont) - XCTAssertEqual(expectedFont, fireButton.titleTextAttributes(for: .selected)?[NSAttributedStringKey.font.rawValue] as! UIFont) + XCTAssertEqual(expectedFont, cancelButton.titleTextAttributes(for: .normal)?[NSAttributedString.Key.font] as! UIFont) + XCTAssertEqual(expectedFont, fireButton.titleTextAttributes(for: .normal)?[NSAttributedString.Key.font] as! UIFont) + XCTAssertEqual(expectedFont, cancelButton.titleTextAttributes(for: .selected)?[NSAttributedString.Key.font] as! UIFont) + XCTAssertEqual(expectedFont, fireButton.titleTextAttributes(for: .selected)?[NSAttributedString.Key.font] as! UIFont) } func testSetPickerBackgroundColor() {