From b95b1a68e9a7fc6de35092aa649dba10d7b0b4ea Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Tue, 13 Jun 2017 14:08:29 +0200 Subject: [PATCH 01/14] xcode9 beta1 --- .../ExampleModel.xcodeproj/project.pbxproj | 22 ++++++++++--- .../xcschemes/ExampleModel.xcscheme | 2 +- JSQDataSourcesKit.xcodeproj/project.pbxproj | 32 +++++++++++++++---- .../xcschemes/JSQDataSourcesKit-iOS.xcscheme | 2 +- .../xcschemes/JSQDataSourcesKit-tvOS.xcscheme | 2 +- .../xcschemes/JSQDataSourcesKitTests.xcscheme | 2 +- Source/DataSource.swift | 10 +++--- 7 files changed, 52 insertions(+), 20 deletions(-) diff --git a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj index 6f69ef7..bdf8c74 100644 --- a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj +++ b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj @@ -152,14 +152,14 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Hexed Bits"; TargetAttributes = { 88AD286F1D1F9621000492FC = { CreatedOnToolsVersion = 7.3.1; DevelopmentTeam = 5VRJU68BZ5; DevelopmentTeamName = "Jesse Squires"; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 88AD28791D1F9621000492FC = { CreatedOnToolsVersion = 7.3.1; @@ -241,14 +241,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; @@ -293,14 +299,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; @@ -346,7 +358,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; }; name = Debug; }; @@ -367,7 +380,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; }; name = Release; }; diff --git a/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme b/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme index 190a0a1..5364b8c 100644 --- a/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme +++ b/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme @@ -1,6 +1,6 @@ : NSFetchedResults - returns: An initialized fetch request controller. */ - public init(fetchRequest: NSFetchRequest, - managedObjectContext context: NSManagedObjectContext, - sectionNameKeyPath: String?, - cacheName name: String?) { + public init(fetchRequest: NSFetchRequest, + managedObjectContext context: NSManagedObjectContext, + sectionNameKeyPath: String?, + cacheName name: String?) { super.init(fetchRequest: fetchRequest as! NSFetchRequest, managedObjectContext: context, sectionNameKeyPath: sectionNameKeyPath, @@ -308,7 +308,7 @@ extension FetchedResultsController: DataSourceProtocol { guard section < numberOfSections() else { return nil } return sections?[section].objects as! [Item]? } - + /// :nodoc: public func item(atRow row: Int, inSection section: Int) -> Item? { guard section < numberOfSections() else { return nil } From 383a67bede32c9652c15bdbed674040331add2ec Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Tue, 13 Jun 2017 14:09:15 +0200 Subject: [PATCH 02/14] xcode9 beta1 --- Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj index bdf8c74..66be101 100644 --- a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj +++ b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj @@ -358,7 +358,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Debug; @@ -380,7 +380,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Release; From f8c3d2c2d197bf5eda4e586fe8eff7786ee000ae Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Tue, 11 Jul 2017 08:11:24 -0700 Subject: [PATCH 03/14] [WIP] xcode 9 beta 3. fuck everything --- Example/Example.xcodeproj/project.pbxproj | 40 ++++++++++++++----- .../xcshareddata/WorkspaceSettings.xcsettings | 8 ++++ .../xcshareddata/xcschemes/Example.xcscheme | 4 +- .../ExampleModel.xcodeproj/project.pbxproj | 2 + .../xcschemes/ExampleModel.xcscheme | 2 + .../FetchedCollectionViewController.swift | 2 +- .../Sources/FetchedTableViewController.swift | 2 +- .../UITests/FetchedResultsViewsUITests.swift | 36 +++++++++++------ Example/UITests/StaticViewsUITests.swift | 4 +- Example/UITests/XCTestCaseExtensions.swift | 24 +++++------ JSQDataSourcesKit.xcodeproj/project.pbxproj | 4 -- .../xcschemes/JSQDataSourcesKit-iOS.xcscheme | 2 + .../xcschemes/JSQDataSourcesKit-tvOS.xcscheme | 2 + .../xcschemes/JSQDataSourcesKitTests.xcscheme | 2 + 14 files changed, 90 insertions(+), 44 deletions(-) create mode 100644 Example/Example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 415d0fd..7042c45 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -329,24 +329,24 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Hexed Bits"; TargetAttributes = { 886EC7801CFF2C8400BDE6FA = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; TestTargetID = 88DB89C01A86D1A900DED153; }; 887863331B3699C800E2F51C = { CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; TestTargetID = 88DB89C01A86D1A900DED153; }; 88DB89C01A86D1A900DED153 = { CreatedOnToolsVersion = 6.1.1; DevelopmentTeam = 5VRJU68BZ5; DevelopmentTeamName = "Jesse Squires"; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; }; }; @@ -542,7 +542,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TEST_TARGET_NAME = Example; }; name = Debug; @@ -560,7 +561,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TEST_TARGET_NAME = Example; }; name = Release; @@ -576,7 +578,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DataSources.app/DataSources"; }; name = Debug; @@ -594,7 +597,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DataSources.app/DataSources"; }; name = Release; @@ -607,14 +611,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; @@ -643,6 +653,7 @@ PRODUCT_NAME = DataSources; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -656,14 +667,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; @@ -683,6 +700,7 @@ MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = DataSources; SDKROOT = iphoneos; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -700,7 +718,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.hexedbits.$(PRODUCT_NAME)"; PRODUCT_MODULE_NAME = Example; PRODUCT_NAME = "$(PRODUCT_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -716,7 +735,8 @@ PRODUCT_MODULE_NAME = Example; PRODUCT_NAME = "$(PRODUCT_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..3ddf867 --- /dev/null +++ b/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildSystemType + Latest + + diff --git a/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index 70e0048..d65606f 100644 --- a/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -1,6 +1,6 @@ @@ -108,6 +109,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj index 66be101..2f7c870 100644 --- a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj +++ b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj @@ -283,6 +283,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -333,6 +334,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme b/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme index 5364b8c..12c1e3e 100644 --- a/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme +++ b/Example/ExampleModel/ExampleModel.xcodeproj/xcshareddata/xcschemes/ExampleModel.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> String) -> Int { - + func countElements(ofType type: XCUIElement.Type, + inView view: XCUIElement, + byUniqueIdentifier identifier: (XCUIElement) -> String) -> Int { var accumulator = Set() var setOfVisibleElementsIdentifiersBeforeScroll = Set() @@ -99,10 +98,9 @@ extension XCTestCase { // Repeat until scrolling makes no changes. repeat { - setOfVisibleElementsIdentifiersAfterScroll = setOfVisibleElementsIdentifiersBeforeScroll - - let currentlyVisibleElements = view.descendants(matching: type).allElementsBoundByIndex.filter{ $0.isHittable } + + let currentlyVisibleElements = view.descendants(matching: type).allElementsBoundByIndex.filter { $0.isHittable } setOfVisibleElementsIdentifiersBeforeScroll = Set(currentlyVisibleElements.map { identifier($0) }) @@ -117,8 +115,9 @@ extension XCTestCase { } /// Sends a tap event to hittable elements of specified type. - func tapOn(_ numberOfElementsToTapOn: Int, hittableElementsOfType type: XCUIElementType, inView view: XCUIElement) { - + func tapOn(_ numberOfElementsToTapOn: Int, + hittableElementsOfType type: XCUIElement.Type, + inView view: XCUIElement) { let hittableElements = view.descendants(matching: type).allElementsBoundByIndex.filter { $0.isHittable } if hittableElements.count < numberOfElementsToTapOn { @@ -130,6 +129,5 @@ extension XCTestCase { element.tap() numberOfElementsTapped += 1 } - } } diff --git a/JSQDataSourcesKit.xcodeproj/project.pbxproj b/JSQDataSourcesKit.xcodeproj/project.pbxproj index cda1aa1..2ddfbc9 100644 --- a/JSQDataSourcesKit.xcodeproj/project.pbxproj +++ b/JSQDataSourcesKit.xcodeproj/project.pbxproj @@ -617,7 +617,6 @@ PRODUCT_NAME = JSQDataSourcesKit; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Debug; @@ -640,7 +639,6 @@ PRODUCT_NAME = JSQDataSourcesKit; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Release; @@ -655,7 +653,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQDataSourcesKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Debug; @@ -670,7 +667,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQDataSourcesKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Release; diff --git a/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-iOS.xcscheme b/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-iOS.xcscheme index bcb00e2..21adf29 100644 --- a/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-iOS.xcscheme +++ b/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-iOS.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"> @@ -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/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-tvOS.xcscheme b/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-tvOS.xcscheme index bef9f7c..5e97c9d 100644 --- a/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-tvOS.xcscheme +++ b/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKit-tvOS.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKitTests.xcscheme b/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKitTests.xcscheme index 0f193f4..fd77a2e 100644 --- a/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKitTests.xcscheme +++ b/JSQDataSourcesKit.xcodeproj/xcshareddata/xcschemes/JSQDataSourcesKitTests.xcscheme @@ -10,6 +10,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> Date: Sun, 23 Jul 2017 07:13:14 -0700 Subject: [PATCH 04/14] fixes for XCUIElementType --- Example/Example.xcodeproj/project.pbxproj | 8 ++++---- .../UITests/FetchedResultsViewsUITests.swift | 18 +++++++++--------- Example/UITests/StaticViewsUITests.swift | 4 ++-- ...sions.swift => XCTestCase+Extensions.swift} | 6 ++++-- 4 files changed, 19 insertions(+), 17 deletions(-) rename Example/UITests/{XCTestCaseExtensions.swift => XCTestCase+Extensions.swift} (96%) diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 7042c45..4a886c9 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 876B25551D02662B00E8B477 /* XCTestCaseExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 876B25511D02661100E8B477 /* XCTestCaseExtensions.swift */; }; + 876B25551D02662B00E8B477 /* XCTestCase+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 876B25511D02661100E8B477 /* XCTestCase+Extensions.swift */; }; 876B25571D03770600E8B477 /* FetchedResultsViewsUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 876B25561D03770600E8B477 /* FetchedResultsViewsUITests.swift */; }; 886EC7921CFF2D4900BDE6FA /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 886EC7901CFF2D4900BDE6FA /* ExampleTests.swift */; }; 886EC7971CFF2DD200BDE6FA /* StaticViewsUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 886EC7951CFF2DD200BDE6FA /* StaticViewsUITests.swift */; }; @@ -117,7 +117,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 876B25511D02661100E8B477 /* XCTestCaseExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestCaseExtensions.swift; sourceTree = ""; }; + 876B25511D02661100E8B477 /* XCTestCase+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "XCTestCase+Extensions.swift"; sourceTree = ""; }; 876B25561D03770600E8B477 /* FetchedResultsViewsUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchedResultsViewsUITests.swift; sourceTree = ""; }; 886EC7811CFF2C8400BDE6FA /* ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 886EC7901CFF2D4900BDE6FA /* ExampleTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleTests.swift; sourceTree = ""; }; @@ -190,7 +190,7 @@ children = ( 886EC7951CFF2DD200BDE6FA /* StaticViewsUITests.swift */, 876B25561D03770600E8B477 /* FetchedResultsViewsUITests.swift */, - 876B25511D02661100E8B477 /* XCTestCaseExtensions.swift */, + 876B25511D02661100E8B477 /* XCTestCase+Extensions.swift */, 886EC7961CFF2DD200BDE6FA /* Info.plist */, ); path = UITests; @@ -452,7 +452,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 876B25551D02662B00E8B477 /* XCTestCaseExtensions.swift in Sources */, + 876B25551D02662B00E8B477 /* XCTestCase+Extensions.swift in Sources */, 876B25571D03770600E8B477 /* FetchedResultsViewsUITests.swift in Sources */, 886EC7971CFF2DD200BDE6FA /* StaticViewsUITests.swift in Sources */, ); diff --git a/Example/UITests/FetchedResultsViewsUITests.swift b/Example/UITests/FetchedResultsViewsUITests.swift index 5870c49..3b06254 100644 --- a/Example/UITests/FetchedResultsViewsUITests.swift +++ b/Example/UITests/FetchedResultsViewsUITests.swift @@ -61,14 +61,14 @@ final class FetchedResultsViewsUITests: XCTestCase { fetchedResultsTableViewMenuItem.tap() // GIVEN: initial number of cells in the table - var numberOfCellsBeforeInTable = countElements(ofType: XCUIElement.Type.cell, inView: table, byUniqueIdentifier: { $0.identifier }) + var numberOfCellsBeforeInTable = countElements(ofType: XCUIElementType.cell, inView: table, byUniqueIdentifier: { $0.identifier }) returnBackIfPossible() fetchedResultsCollectionViewMenuItem.tap() // GIVEN: initial number of cells in the collection view - var numberOfCellsBeforeInCollectionView = countElements(ofType: XCUIElement.Type.cell, inView: collectionView, + var numberOfCellsBeforeInCollectionView = countElements(ofType: XCUIElementType.cell, inView: collectionView, byUniqueIdentifier: { $0.identifier }) XCTAssertEqual(numberOfCellsBeforeInTable, numberOfCellsBeforeInCollectionView, @@ -86,7 +86,7 @@ final class FetchedResultsViewsUITests: XCTestCase { fetchedResultsTableViewMenuItem.tap() // THEN: new items get added to the table - let numberOfCellsAfterInTable = countElements(ofType: XCUIElement.Type.cell, inView: table, byUniqueIdentifier: { $0.identifier }) + let numberOfCellsAfterInTable = countElements(ofType: XCUIElementType.cell, inView: table, byUniqueIdentifier: { $0.identifier }) XCTAssertEqual(numberOfCellsAfterInTable, numberOfCellsBeforeInTable + numberOfItemsAdded, "\"Add\" button should cause adding new cells") @@ -97,7 +97,7 @@ final class FetchedResultsViewsUITests: XCTestCase { fetchedResultsCollectionViewMenuItem.tap() // THEN: new items get added to the collection view as well - let numberOfCellsAfterInCollectionView = countElements(ofType: XCUIElement.Type.cell, inView: collectionView, + let numberOfCellsAfterInCollectionView = countElements(ofType: XCUIElementType.cell, inView: collectionView, byUniqueIdentifier: { $0.identifier }) XCTAssertEqual(numberOfCellsAfterInCollectionView, numberOfCellsBeforeInCollectionView + numberOfItemsAdded, "\"Add\" button should cause adding new cells") @@ -165,7 +165,7 @@ final class FetchedResultsViewsUITests: XCTestCase { fetchedResultsCollectionViewMenuItem.tap() // GIVEN: initial number of cells in the collection view - let numberOfCellsBeforeInCollectionView = countElements(ofType: XCUIElement.Type.cell, + let numberOfCellsBeforeInCollectionView = countElements(ofType: XCUIElementType.cell, inView: collectionView, byUniqueIdentifier: { $0.identifier }) @@ -175,7 +175,7 @@ final class FetchedResultsViewsUITests: XCTestCase { // THEN: a new cell appears in the collection view scrollOnStatusBarTap() - let numberOfCellsAfterInCollectionView = countElements(ofType: XCUIElement.Type.cell, + let numberOfCellsAfterInCollectionView = countElements(ofType: XCUIElementType.cell, inView: collectionView, byUniqueIdentifier: { $0.identifier }) @@ -190,7 +190,7 @@ final class FetchedResultsViewsUITests: XCTestCase { fetchedResultsTableViewMenuItem.tap() // GIVEN: initial number of cells in the table view - let numberOfCellsBeforeInTable = countElements(ofType: XCUIElement.Type.cell, + let numberOfCellsBeforeInTable = countElements(ofType: XCUIElementType.cell, inView: table, byUniqueIdentifier: { $0.identifier }) @@ -200,7 +200,7 @@ final class FetchedResultsViewsUITests: XCTestCase { // THEN: a new cell appears in the table view scrollOnStatusBarTap() - let numberOfCellsAfterInTable = countElements(ofType: XCUIElement.Type.cell, + let numberOfCellsAfterInTable = countElements(ofType: XCUIElementType.cell, inView: table, byUniqueIdentifier: { $0.identifier }) @@ -226,7 +226,7 @@ final class FetchedResultsViewsUITests: XCTestCase { fetchedResultsTableViewMenuItem.tap() // GIVEN: initial number of cells in the table view - let numberOfCellsBeforeInTable = countElements(ofType: XCUIElement.Type.cell, + let numberOfCellsBeforeInTable = countElements(ofType: XCUIElementType.cell, inView: table, byUniqueIdentifier: { $0.identifier }) diff --git a/Example/UITests/StaticViewsUITests.swift b/Example/UITests/StaticViewsUITests.swift index 03b50de..2dbcac8 100644 --- a/Example/UITests/StaticViewsUITests.swift +++ b/Example/UITests/StaticViewsUITests.swift @@ -45,7 +45,7 @@ final class StaticViewsUITests: XCTestCase { staticTableViewMenuItem.tap() // THEN: the number of cells loaded matches the number of cells expected - let countTableCells = countElements(ofType: XCUIElement.Type.cell, + let countTableCells = countElements(ofType: XCUIElementType.cell, inView: table, byUniqueIdentifier: { $0.identifier }) @@ -61,7 +61,7 @@ final class StaticViewsUITests: XCTestCase { staticCollectionViewMenuItem.tap() // THEN: the number of cells loaded matches the number of cells expected - let countCollectionViewCells = countElements(ofType: XCUIElement.Type.cell, + let countCollectionViewCells = countElements(ofType: XCUIElementType.cell, inView: collectionView, byUniqueIdentifier: { $0.identifier }) diff --git a/Example/UITests/XCTestCaseExtensions.swift b/Example/UITests/XCTestCase+Extensions.swift similarity index 96% rename from Example/UITests/XCTestCaseExtensions.swift rename to Example/UITests/XCTestCase+Extensions.swift index ac2ca3f..59f60a2 100644 --- a/Example/UITests/XCTestCaseExtensions.swift +++ b/Example/UITests/XCTestCase+Extensions.swift @@ -18,6 +18,8 @@ import XCTest +typealias XCUIElementType = XCUIElement.`Type` + extension XCTestCase { /** @@ -88,7 +90,7 @@ extension XCTestCase { - returns: The number of presented unique elements. */ - func countElements(ofType type: XCUIElement.Type, + func countElements(ofType type: XCUIElementType, inView view: XCUIElement, byUniqueIdentifier identifier: (XCUIElement) -> String) -> Int { var accumulator = Set() @@ -116,7 +118,7 @@ extension XCTestCase { /// Sends a tap event to hittable elements of specified type. func tapOn(_ numberOfElementsToTapOn: Int, - hittableElementsOfType type: XCUIElement.Type, + hittableElementsOfType type: XCUIElementType, inView view: XCUIElement) { let hittableElements = view.descendants(matching: type).allElementsBoundByIndex.filter { $0.isHittable } From 91856ac6cb4e1ed4ed1b7e543cd5576147168e9b Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Sun, 30 Jul 2017 16:27:57 -0700 Subject: [PATCH 05/14] update travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ef79e85..88d121f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode8.3 +osx_image: xcode9 env: global: From 897b892dd76af89097b2f6ea3e9b6bfb128f39f9 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Sun, 30 Jul 2017 16:29:33 -0700 Subject: [PATCH 06/14] xcode 9 --- Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj | 2 -- JSQDataSourcesKit.xcodeproj/project.pbxproj | 2 -- 2 files changed, 4 deletions(-) diff --git a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj index 2f7c870..eb67a76 100644 --- a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj +++ b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj @@ -360,7 +360,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Debug; @@ -382,7 +381,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Release; diff --git a/JSQDataSourcesKit.xcodeproj/project.pbxproj b/JSQDataSourcesKit.xcodeproj/project.pbxproj index 2ddfbc9..b87920f 100644 --- a/JSQDataSourcesKit.xcodeproj/project.pbxproj +++ b/JSQDataSourcesKit.xcodeproj/project.pbxproj @@ -540,7 +540,6 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -590,7 +589,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; From ceacea2235d0d87cd32b59d34218acd0b6c857ab Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Sun, 5 Nov 2017 18:07:21 -0800 Subject: [PATCH 07/14] travis --- .travis.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88d121f..8b401e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,27 +10,24 @@ env: - IOS_SCHEME="JSQDataSourcesKit-iOS" - TVOS_SCHEME="JSQDataSourcesKit-tvOS" - - IOS_SDK=iphonesimulator10.3 - - TVOS_SDK=appletvsimulator10.2 + - IOS_SDK=iphonesimulator11.0 + - TVOS_SDK=appletvsimulator11.0 matrix: - - DESTINATION="OS=8.1,name=iPhone 4s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="YES" - - DESTINATION="OS=8.2,name=iPhone 5" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=8.3,name=iPhone 5s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=8.4,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - - - DESTINATION="OS=9.0,name=iPhone 6 Plus" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=9.0,name=iPhone 6 Plus" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES" - DESTINATION="OS=9.1,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - DESTINATION="OS=9.2,name=iPhone 6s Plus" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=9.3,name=iPad Pro" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=9.3,name=iPad Air 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + + - DESTINATION="OS=10.0,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=10.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=10.2,name=iPad Air 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=10.3.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=10.0,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=10.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=10.2,name=iPad Air" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=10.3,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=11.0,name=iPhone X" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=9.0,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - DESTINATION="OS=10.0,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=11.0,name=Apple TV 4K" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" script: - set -o pipefail From 257f620a04725bffbfef74df81e7ecd1129482ab Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Sun, 5 Nov 2017 18:08:19 -0800 Subject: [PATCH 08/14] readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 855ac0e..d106658 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ This library reduces the boilerplate code regarding the `UITableView`, `UICollec ## Requirements -* iOS 8+ -* Swift 3.0 -* Xcode 8 +* iOS 9+ +* Swift 4.0+ +* Xcode 9+ ## Installation From 25ae7eecbba236e169fcdeaef281ce4516bd499b Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Sun, 5 Nov 2017 18:16:28 -0800 Subject: [PATCH 09/14] proj settings and min target OS --- Example/Example.xcodeproj/project.pbxproj | 35 ++++++++++++------- .../ExampleModel.xcodeproj/project.pbxproj | 20 +++++------ JSQDataSourcesKit.xcodeproj/project.pbxproj | 20 +++++------ README.md | 3 +- Source/Info.plist | 2 +- 5 files changed, 44 insertions(+), 36 deletions(-) diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 4a886c9..5b2c775 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -335,6 +335,7 @@ 886EC7801CFF2C8400BDE6FA = { CreatedOnToolsVersion = 7.3.1; LastSwiftMigration = 0900; + ProvisioningStyle = Automatic; TestTargetID = 88DB89C01A86D1A900DED153; }; 887863331B3699C800E2F51C = { @@ -344,9 +345,9 @@ }; 88DB89C01A86D1A900DED153 = { CreatedOnToolsVersion = 6.1.1; - DevelopmentTeam = 5VRJU68BZ5; DevelopmentTeamName = "Jesse Squires"; LastSwiftMigration = 0900; + ProvisioningStyle = Automatic; }; }; }; @@ -535,14 +536,17 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_NONNULL = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = UITests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.0; TEST_TARGET_NAME = Example; }; @@ -552,16 +556,19 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_NONNULL = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = UITests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; TEST_TARGET_NAME = Example; }; @@ -578,7 +585,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DataSources.app/DataSources"; }; @@ -597,7 +603,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DataSources.app/DataSources"; }; @@ -653,8 +658,7 @@ PRODUCT_NAME = DataSources; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -700,8 +704,7 @@ MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = DataSources; SDKROOT = iphoneos; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -712,13 +715,16 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.hexedbits.$(PRODUCT_NAME)"; PRODUCT_MODULE_NAME = Example; PRODUCT_NAME = "$(PRODUCT_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.0; }; name = Debug; @@ -728,14 +734,17 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.hexedbits.$(PRODUCT_NAME)"; PRODUCT_MODULE_NAME = Example; PRODUCT_NAME = "$(PRODUCT_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; }; name = Release; diff --git a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj index eb67a76..d836d32 100644 --- a/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj +++ b/Example/ExampleModel/ExampleModel.xcodeproj/project.pbxproj @@ -163,7 +163,7 @@ }; 88AD28791D1F9621000492FC = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0910; }; }; }; @@ -278,13 +278,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -331,11 +330,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -354,7 +352,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleModel; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -375,7 +373,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleModel; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -392,7 +390,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleModelTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -404,7 +402,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.ExampleModelTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/JSQDataSourcesKit.xcodeproj/project.pbxproj b/JSQDataSourcesKit.xcodeproj/project.pbxproj index b87920f..500d203 100644 --- a/JSQDataSourcesKit.xcodeproj/project.pbxproj +++ b/JSQDataSourcesKit.xcodeproj/project.pbxproj @@ -460,9 +460,9 @@ PRODUCT_NAME = JSQDataSourcesKit; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 10.0; }; name = Debug; }; @@ -484,9 +484,9 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 10.0; }; name = Release; }; @@ -535,12 +535,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -586,10 +586,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -608,7 +608,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQDataSourcesKit; PRODUCT_MODULE_NAME = "$(PRODUCT_NAME)"; @@ -630,7 +630,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.hexedbits.JSQDataSourcesKit; PRODUCT_MODULE_NAME = "$(PRODUCT_NAME)"; diff --git a/README.md b/README.md index d106658..84b066d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ This library reduces the boilerplate code regarding the `UITableView`, `UICollec ## Requirements -* iOS 9+ +* iOS 9.0+ +* tvOS 10.0+ * Swift 4.0+ * Xcode 9+ diff --git a/Source/Info.plist b/Source/Info.plist index a3d5bd3..a35bfc7 100644 --- a/Source/Info.plist +++ b/Source/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.0.0 + 7.0.0 CFBundleSignature ???? CFBundleVersion From f94444ae97ef2753f8305e0a1bd340145b514071 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Sun, 5 Nov 2017 18:20:59 -0800 Subject: [PATCH 10/14] gen docs --- docs/Classes.html | 29 +- docs/Classes/DataSourceProvider.html | 71 ++- docs/Classes/FetchedResultsController.html | 36 +- .../FetchedResultsDelegateProvider.html | 49 +- docs/Classes/TitledSupplementaryView.html | 29 +- docs/Enums.html | 27 +- docs/Enums/ReusableViewType.html | 27 +- docs/Protocols.html | 33 +- docs/Protocols/CellParentViewProtocol.html | 40 +- docs/Protocols/DataSourceProtocol.html | 111 +++-- .../ReusableViewFactoryProtocol.html | 94 ++-- docs/Protocols/ReusableViewProtocol.html | 25 +- docs/Protocols/SectionInfoProtocol.html | 31 +- docs/Structs.html | 71 ++- docs/Structs/DataSource.html | 427 +++++++++++++++--- docs/Structs/Section.html | 160 +++---- docs/Structs/TableEditingController.html | 392 ++++++++++++++++ .../TitledSupplementaryViewFactory.html | 41 +- docs/Structs/ViewFactory.html | 54 +-- docs/badge.svg | 28 ++ docs/css/jazzy.css | 5 + docs/index.html | 67 +-- docs/js/jazzy.js | 6 + docs/search.json | 1 + docs/undocumented.json | 8 +- 25 files changed, 1353 insertions(+), 509 deletions(-) create mode 100644 docs/Structs/TableEditingController.html create mode 100644 docs/badge.svg create mode 100644 docs/search.json diff --git a/docs/Classes.html b/docs/Classes.html index 49898c7..6139ef8 100644 --- a/docs/Classes.html +++ b/docs/Classes.html @@ -13,7 +13,7 @@
-

JSQDataSourcesKit Docs (100% documented)

+

JSQDataSourcesKit Docs (98% documented)

View on GitHub

@@ -45,7 +45,7 @@
  • @@ -377,8 +402,8 @@

    Declaration

    diff --git a/docs/Classes/FetchedResultsController.html b/docs/Classes/FetchedResultsController.html index f9bb763..3ed439d 100644 --- a/docs/Classes/FetchedResultsController.html +++ b/docs/Classes/FetchedResultsController.html @@ -14,7 +14,7 @@
    -

    JSQDataSourcesKit Docs (100% documented)

    +

    JSQDataSourcesKit Docs (98% documented)

    View on GitHub

    @@ -46,7 +46,7 @@
  • +
  • +
    + + + + init(sections:) + +
    +
    +
    +
    +
    +
    +

    Constructs a new DataSource.

    +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(sections: S...)
    + +
    +
    +
    +

    Parameters

    + + + + + @@ -161,8 +252,76 @@

    Parameters

    Return Value

    -

    The item at indexPath.

    +

    A new DataSource instance.

    +
    + + + + + +
    + +
      +
    • +
      + + + + insert(item:at:) + +
      +
      +
      +
      +
      +
      +

      Inserts the item at the specified index path.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public mutating func insert(item: S.Item, at indexPath: IndexPath)
      +
      +
      +
      +

      Parameters

      +
    + + sections + + +
    +

    The sections for the data source.

    + + + + + + + + + + +
    + + item + + +
    +

    The item to be inserted.

    +
    +
    + + indexPath + + +
    +

    The index path specifying the location for the item.

    +
    +
    @@ -170,9 +329,9 @@

    Return Value

  • @@ -180,13 +339,14 @@

    Return Value

    - +

    Inserts the item at the specified row and section.

    +

    Declaration

    Swift

    -
    public subscript (index: Int) -> S
    +
    public mutating func insert(item: S.Item, atRow row: Int, inSection section: Int)
    @@ -197,13 +357,152 @@

    Parameters

    - index + item
    -

    The index of a section.

    +

    The item to be inserted.

    +
    + + + + + + row + + + +
    +

    The row location for the item.

    +
    + + + + + + section + + + +
    +

    The section location for the item.

    +
    + + + + +
    + + +
  • +
  • +
    + + + + append(_:inSection:) + +
    +
    +
    +
    +
    +
    +

    Appends the item at the specified section.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public mutating func append(_ item: S.Item, inSection section: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + item + + +
    +

    The item to be appended.

    +
    +
    + + section + + +
    +

    The section location for the item.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Removes the item at the specified row and section.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public mutating func remove(atRow row: Int, inSection section: Int) -> S.Item?
    +
    +
    +
    +

    Parameters

    + + + + + + + + + @@ -212,8 +511,7 @@

    Parameters

    Return Value

    -

    The section at index.

    - +

    The item removed, or nil if it does not exist.

    @@ -221,9 +519,9 @@

    Return Value

  • - - - sections + + + remove(at:)
    @@ -231,17 +529,40 @@

    Return Value

    -

    The sections in the data source.

    +

    Removes the item at the specified index path.

    Declaration

    Swift

    -
    public var sections: [S]
    +
    public mutating func remove(at indexPath: IndexPath) -> S.Item?
    +
    +

    Parameters

    +
  • + + row + + +
    +

    The row location of the item.

    +
    +
    + + section + + +
    +

    The section location of the item.

    + + + + + + +
    + + indexPath + + +
    +

    The index path specifying the location of the item.

    +
    +
    +
    +
    +

    Return Value

    +

    The item at indexPath, or nil if it does not exist.

    +
  • @@ -249,19 +570,19 @@

    Declaration

    • - - - init(_:) + + + subscript(_:)
      @@ -269,14 +590,13 @@

      Initialization

      -

      Constructs a new DataSource.

      - +

      Declaration

      Swift

      -
      public init(_ sections: [S])
      +
      public subscript (index: Int) -> S
      @@ -287,13 +607,12 @@

      Parameters

      - sections + index
      -

      The sections for the data source.

      - +

      The index of a section.

      @@ -302,8 +621,7 @@

      Parameters

      Return Value

      -

      A new DataSource instance.

      - +

      The section at index.

    @@ -311,9 +629,9 @@

    Return Value

  • @@ -321,14 +639,13 @@

    Return Value

    -

    Constructs a new DataSource.

    - +

    Declaration

    Swift

    -
    public init(sections: S...)
    +
    public subscript (indexPath: IndexPath) -> S.Item
    @@ -339,13 +656,12 @@

    Parameters

    - sections + indexPath
    -

    The sections for the data source.

    - +

    The index path of an item.

    @@ -354,8 +670,7 @@

    Parameters

    Return Value

    -

    A new DataSource instance.

    - +

    The item at indexPath.

    @@ -365,8 +680,8 @@

    Return Value

    diff --git a/docs/Structs/Section.html b/docs/Structs/Section.html index 9cf7bd5..7c6d292 100644 --- a/docs/Structs/Section.html +++ b/docs/Structs/Section.html @@ -1,7 +1,7 @@ - Section Struct Reference + Section Structure Reference @@ -11,10 +11,10 @@ - +
    -

    JSQDataSourcesKit Docs (100% documented)

    +

    JSQDataSourcesKit Docs (98% documented)

    View on GitHub

    @@ -22,7 +22,7 @@
    @@ -46,7 +46,7 @@