diff --git a/DataSource.xcodeproj/project.pbxproj b/DataSource.xcodeproj/project.pbxproj index ab8d1c2..a5af096 100644 --- a/DataSource.xcodeproj/project.pbxproj +++ b/DataSource.xcodeproj/project.pbxproj @@ -375,13 +375,13 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "aaa - all about apps GmbH"; TargetAttributes = { 395D147B1B90610A00658680 = { CreatedOnToolsVersion = 7.0; DevelopmentTeam = PRXJBCN9SJ; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.GameCenter = { @@ -394,11 +394,12 @@ }; 395D14A31B90612D00658680 = { CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0820; + LastSwiftMigration = 0900; }; 39A848631E5E1D9600D7DBC2 = { CreatedOnToolsVersion = 8.2.1; DevelopmentTeam = PRXJBCN9SJ; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; TestTargetID = 395D147B1B90610A00658680; }; @@ -565,14 +566,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; @@ -611,14 +618,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; @@ -659,7 +672,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -681,7 +695,8 @@ PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -706,7 +721,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -734,7 +750,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -758,7 +775,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.buchetics.DataSourceTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; }; name = Debug; @@ -780,7 +798,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.buchetics.DataSourceTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; }; name = Release; diff --git a/DataSource.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/DataSource.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..3ddf867 --- /dev/null +++ b/DataSource.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildSystemType + Latest + + diff --git a/DataSource.xcodeproj/xcshareddata/xcschemes/DataSource.xcscheme b/DataSource.xcodeproj/xcshareddata/xcschemes/DataSource.xcscheme index 21b1c7c..a0addad 100644 --- a/DataSource.xcodeproj/xcshareddata/xcschemes/DataSource.xcscheme +++ b/DataSource.xcodeproj/xcshareddata/xcschemes/DataSource.xcscheme @@ -1,6 +1,6 @@ @@ -33,7 +34,7 @@ skipped = "NO"> @@ -56,6 +57,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/DataSource.xcodeproj/xcshareddata/xcschemes/DataSourceTests.xcscheme b/DataSource.xcodeproj/xcshareddata/xcschemes/DataSourceTests.xcscheme index e5ee577..124724d 100644 --- a/DataSource.xcodeproj/xcshareddata/xcschemes/DataSourceTests.xcscheme +++ b/DataSource.xcodeproj/xcshareddata/xcschemes/DataSourceTests.xcscheme @@ -1,6 +1,6 @@ @@ -55,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/DataSource.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/DataSource.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index 44b32a4..a2c2efd 100644 --- a/DataSource.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/DataSource.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -1,6 +1,6 @@ @@ -65,6 +66,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/DataSource/Info.plist b/DataSource/Info.plist index 755d287..01efda1 100644 --- a/DataSource/Info.plist +++ b/DataSource/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.0.3 + 5.0 CFBundleSignature ???? CFBundleVersion - 43 + 50 NSPrincipalClass diff --git a/Example/Info.plist b/Example/Info.plist index c36c6d3..2c37027 100644 --- a/Example/Info.plist +++ b/Example/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.0.3 + 5.0 CFBundleSignature ???? CFBundleVersion - 43 + 50 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/Example/ViewControllers/Examples/RandomPersonsViewController.swift b/Example/ViewControllers/Examples/RandomPersonsViewController.swift index 7add73f..efc2288 100644 --- a/Example/ViewControllers/Examples/RandomPersonsViewController.swift +++ b/Example/ViewControllers/Examples/RandomPersonsViewController.swift @@ -74,7 +74,7 @@ class RandomPersonsViewController: UITableViewController { extension RandomPersonsViewController { override func scrollViewDidScroll(_ scrollView: UIScrollView) { - print("Scrolled: \(scrollView.contentOffset.y)") + print("scrolled: \(scrollView.contentOffset.y)") } } @@ -87,7 +87,7 @@ struct Person { let lastName: String func lastNameStartsWith(letters: Set) -> Bool { - let letter = lastName.substring(to: lastName.index(lastName.startIndex, offsetBy: 1)) + let letter = String(lastName[lastName.startIndex]) return letters.contains(letter) } diff --git a/MBDataSource.podspec b/MBDataSource.podspec index f3c00b2..94fd188 100644 --- a/MBDataSource.podspec +++ b/MBDataSource.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.name = "MBDataSource" - s.version = "4.0.1" + s.version = "5.0" s.summary = "Simplifies the setup of UITableView data sources and cells using type-safe cell configurators." s.description = <<-DESC Framework to simplify the setup of UITableView data sources and cells. diff --git a/README.md b/README.md index 6f441a5..81bbedd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DataSource -[![Swift 3](https://img.shields.io/badge/Language-Swift%203-orange.svg)](https://developer.apple.com/swift) +[![Swift 4](https://img.shields.io/badge/Language-Swift%204-orange.svg)](https://developer.apple.com/swift) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg)](https://github.com/Carthage/Carthage) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/MBDataSource.svg)](https://cocoapods.org/pods/MBDataSource) [![CBuild status](https://travis-ci.org/mbuchetics/DataSource.svg?branch=master)](https://travis-ci.org/mbuchetics/DataSource) @@ -225,6 +225,7 @@ Current Swift compatibility breakdown: | Swift Version | Framework Version | | ------------- | ----------------- | +| 4.x | 5.x | | 3.x | 3.x, 4.x | [all releases]: https://github.com/mbuchetics/DataSource/releases @@ -236,7 +237,7 @@ Current Swift compatibility breakdown: Add the following line to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile). ``` -github "mbuchetics/DataSource", ~> 4.0 +github "mbuchetics/DataSource", ~> 5.0 ``` Then run `carthage update`.