From 03ba583c4932dc5ccbf39da646a67ad4471f3573 Mon Sep 17 00:00:00 2001 From: Meng Li Date: Tue, 9 Apr 2019 14:19:36 +0900 Subject: [PATCH 1/4] Swift 5.0 and Xcode 10.2. --- .../InfiniteLayout.xcodeproj/project.pbxproj | 29 ++++++++++--------- .../xcschemes/InfiniteLayout-Example.xcscheme | 4 +-- Example/InfiniteLayout/AppDelegate.swift | 2 +- Example/InfiniteLayout/Cell.swift | 2 +- Example/Podfile | 3 +- Example/Podfile.lock | 14 ++++----- .../Rx/InfiniteCollectionView+Rx.swift | 4 +-- 7 files changed, 27 insertions(+), 31 deletions(-) diff --git a/Example/InfiniteLayout.xcodeproj/project.pbxproj b/Example/InfiniteLayout.xcodeproj/project.pbxproj index 03a5db8..2e0bd5d 100644 --- a/Example/InfiniteLayout.xcodeproj/project.pbxproj +++ b/Example/InfiniteLayout.xcodeproj/project.pbxproj @@ -262,18 +262,18 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = CPE39ZT2AY; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = CPE39ZT2AY; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -283,6 +283,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -328,7 +329,6 @@ "${BUILT_PRODUCTS_DIR}/CocoaProxy/CocoaProxy.framework", "${BUILT_PRODUCTS_DIR}/Differentiator/Differentiator.framework", "${BUILT_PRODUCTS_DIR}/InfiniteLayout/InfiniteLayout.framework", - "${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework", "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", "${BUILT_PRODUCTS_DIR}/RxDataSources/RxDataSources.framework", "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", @@ -338,7 +338,6 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaProxy.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Differentiator.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/InfiniteLayout.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxDataSources.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", @@ -443,6 +442,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -451,12 +451,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; @@ -489,6 +491,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -496,6 +499,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -504,12 +508,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; @@ -534,6 +540,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -549,8 +556,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Debug; @@ -566,8 +572,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -589,8 +594,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_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -607,8 +611,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_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Example/InfiniteLayout.xcodeproj/xcshareddata/xcschemes/InfiniteLayout-Example.xcscheme b/Example/InfiniteLayout.xcodeproj/xcshareddata/xcschemes/InfiniteLayout-Example.xcscheme index c023492..adabfef 100644 --- a/Example/InfiniteLayout.xcodeproj/xcshareddata/xcschemes/InfiniteLayout-Example.xcscheme +++ b/Example/InfiniteLayout.xcodeproj/xcshareddata/xcschemes/InfiniteLayout-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/InfiniteLayout/Cell.swift b/Example/InfiniteLayout/Cell.swift index bf61893..85b8021 100644 --- a/Example/InfiniteLayout/Cell.swift +++ b/Example/InfiniteLayout/Cell.swift @@ -31,7 +31,7 @@ enum CellStyle { let colors = [#colorLiteral(red: 0.5254901961, green: 0.6901960784, blue: 0.9137254902, alpha: 1), #colorLiteral(red: 0.5254901961, green: 0.6196078431, blue: 0.9137254902, alpha: 1), #colorLiteral(red: 0.6078431373, green: 0.5254901961, blue: 0.9137254902, alpha: 1), #colorLiteral(red: 0.9137254902, green: 0.5254901961, blue: 0.8392156863, alpha: 1), #colorLiteral(red: 0.9137254902, green: 0.5254901961, blue: 0.6, alpha: 1), #colorLiteral(red: 0.9137254902, green: 0.6784313725, blue: 0.5254901961, alpha: 1), #colorLiteral(red: 0.9137254902, green: 0.9058823529, blue: 0.5254901961, alpha: 1), #colorLiteral(red: 0.5254901961, green: 0.9137254902, blue: 0.5921568627, alpha: 1), #colorLiteral(red: 0.5254901961, green: 0.8, blue: 0.9137254902, alpha: 1)] @IBInspectable var styleIndex: Int { - get { return CellStyle.all.index(of: style)! } + get { return CellStyle.all.firstIndex(of: style)! } set { style = CellStyle.all[newValue % CellStyle.all.count] } } diff --git a/Example/Podfile b/Example/Podfile index 8377596..135f253 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,4 +1,5 @@ use_frameworks! +platform :ios, '10.0' target 'InfiniteLayout_Example' do pod 'InfiniteLayout', :path => '../' @@ -6,7 +7,5 @@ target 'InfiniteLayout_Example' do target 'InfiniteLayout_Tests' do inherit! :search_paths - - end end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index a49be5a..0b8df6c 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -12,15 +12,13 @@ PODS: - RxCocoa (~> 4) - RxDataSources (~> 3) - RxSwift (~> 4) - - RxAtomic (4.4.2) - - RxCocoa (4.4.2): + - RxCocoa (4.5.0): - RxSwift (>= 4.4.2, ~> 4.4) - RxDataSources (3.1.0): - Differentiator (~> 3.0) - RxCocoa (~> 4.0) - RxSwift (~> 4.0) - - RxSwift (4.4.2): - - RxAtomic (>= 4.4.2, ~> 4.4) + - RxSwift (4.5.0) DEPENDENCIES: - InfiniteLayout (from `../`) @@ -30,7 +28,6 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - CocoaProxy - Differentiator - - RxAtomic - RxCocoa - RxDataSources - RxSwift @@ -43,11 +40,10 @@ SPEC CHECKSUMS: CocoaProxy: 35ab81e24325b33834cffe45a3d1fd48ca67ef3a Differentiator: be49ca3408f0ecfc761e4c7763d20c62be01b9ad InfiniteLayout: 24d5e5ea1528bb86ee00a4e3c02f93fdb38e3f68 - RxAtomic: d00e97c10db88c6f08540e0bf2752fc5a2404167 - RxCocoa: 477990dc3b4c3ff55fb0ac77e1cc06244e0aaec8 + RxCocoa: cbf70265dc65a981d4ac982e513c10cf23df24a0 RxDataSources: a843bad90c29817f5923ec8163f4af2de084ceb3 - RxSwift: 74c29b693c8e42b0f64400e8b06564575742d649 + RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575 -PODFILE CHECKSUM: 3501aeed91e62112dd38178a52f26b204b97c8c0 +PODFILE CHECKSUM: 0dc7a9b37f9b7c5d5266beaab9e94861b80aa80f COCOAPODS: 1.6.1 diff --git a/InfiniteLayout/Rx/InfiniteCollectionView+Rx.swift b/InfiniteLayout/Rx/InfiniteCollectionView+Rx.swift index 3bfbe3a..fd2db8c 100644 --- a/InfiniteLayout/Rx/InfiniteCollectionView+Rx.swift +++ b/InfiniteLayout/Rx/InfiniteCollectionView+Rx.swift @@ -31,7 +31,7 @@ class RxInfiniteCollectionViewDelegate: DelegateProxy (infinite: Bool) From b3038a90ec12c93e75a1d7c4cfafc8bc983e5904 Mon Sep 17 00:00:00 2001 From: Meng Li Date: Tue, 9 Apr 2019 14:21:00 +0900 Subject: [PATCH 2/4] Update podspec. --- .swift-version | 2 +- InfiniteLayout.podspec | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.swift-version b/.swift-version index bf77d54..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.0 diff --git a/InfiniteLayout.podspec b/InfiniteLayout.podspec index d39ad7a..3ad01bc 100644 --- a/InfiniteLayout.podspec +++ b/InfiniteLayout.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'InfiniteLayout' - s.version = '0.3' + s.version = '0.4' s.summary = 'Horizontal and Vertical infinite scrolling feature for UICollectionView with Paging, NSProxy delegate, Reactive extension' # This description is used to generate tags and improve search results. @@ -49,9 +49,9 @@ Horizontal and Vertical infinite scrolling feature for UICollectionView with Pag s.subspec 'Rx' do |rx| rx.dependency 'InfiniteLayout/Core', '~> 0' - rx.dependency 'RxSwift', '~> 4' - rx.dependency 'RxCocoa', '~> 4' - rx.dependency 'RxDataSources', '~> 3' + rx.dependency 'RxSwift', '~> 4.5' + rx.dependency 'RxCocoa', '~> 4.5' + rx.dependency 'RxDataSources', '~> 3.1' rx.source_files = 'InfiniteLayout/Rx/**/*' end end From 62782d83f982ec5ace84d50dd52e2074ca97a302 Mon Sep 17 00:00:00 2001 From: Meng Li Date: Tue, 9 Apr 2019 14:49:44 +0900 Subject: [PATCH 3/4] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c31be32..06ee743 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ # * http://www.objc.io/issue-6/travis-ci.html # * https://github.com/supermarin/xcpretty#usage -osx_image: xcode10.1 +osx_image: xcode10.2 language: swift before_install: - gem install cocoapods # Since Travis is not always on latest version From b178f69898635e1d3d6167b137447e7e87256a24 Mon Sep 17 00:00:00 2001 From: Meng Li Date: Tue, 9 Apr 2019 15:20:18 +0900 Subject: [PATCH 4/4] Update build script. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 06ee743..1b5a1e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,5 @@ before_install: - pod repo update - pod install --project-directory=Example script: +- set -o pipefail && xcodebuild -workspace Example/InfiniteLayout.xcworkspace -scheme InfiniteLayout-Example -sdk iphonesimulator build CODE_SIGNING_REQUIRED=NO | xcpretty -c - pod lib lint