Skip to content

Commit

Permalink
Merge pull request #2 from stefanrenne/feature/swift4.2
Browse files Browse the repository at this point in the history
Feature/swift4.2
  • Loading branch information
RuudPuts authored Nov 18, 2018
2 parents 74d735f + cef6bb4 commit 5a76c6f
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 42 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.2
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: swift
os: osx
osx_image: xcode9.4
osx_image: xcode10.1
cache:
directories:
- Pods
Expand All @@ -12,7 +12,7 @@ env:
- SCHEME=Down
- CC_TEST_REPORTER_ID=4074485b984af5323f0806408b43441628bc6f72f523b89c5338f87ae807820a
matrix:
- DESTINATION="OS=11.3,name=iPhone X"
- DESTINATION="OS=12.1,name=iPhone XS"
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
Expand Down
21 changes: 19 additions & 2 deletions Down.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1828,8 +1828,8 @@
isa = PBXNativeTarget;
buildConfigurationList = 426A799B20D1810200797AE5 /* Build configuration list for PBXNativeTarget "Down" */;
buildPhases = (
F864179F21A03742006C03A1 /* Generate R File */,
8B47AB3386A0F09B7788EFB7 /* [CP] Check Pods Manifest.lock */,
F864179F21A03742006C03A1 /* Generate R File */,
426A797A20D1810100797AE5 /* Sources */,
426A797B20D1810100797AE5 /* Frameworks */,
426A797C20D1810100797AE5 /* Resources */,
Expand Down Expand Up @@ -1880,17 +1880,20 @@
TargetAttributes = {
4221DA2B20D1819F003950CF = {
CreatedOnToolsVersion = 10.0;
LastSwiftMigration = 1010;
};
4221DA3320D1819F003950CF = {
CreatedOnToolsVersion = 10.0;
LastSwiftMigration = 1010;
TestTargetID = 426A797D20D1810100797AE5;
};
426A797D20D1810100797AE5 = {
CreatedOnToolsVersion = 9.4;
LastSwiftMigration = 1010;
};
426A799120D1810200797AE5 = {
CreatedOnToolsVersion = 9.4;
LastSwiftMigration = 0940;
LastSwiftMigration = 1010;
TestTargetID = 426A797D20D1810100797AE5;
};
};
Expand Down Expand Up @@ -2064,6 +2067,7 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DownKitTests/Pods-DownKitTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
"${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework",
"${BUILT_PRODUCTS_DIR}/Quick/Quick.framework",
Expand All @@ -2080,6 +2084,7 @@
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework",
Expand Down Expand Up @@ -2146,6 +2151,7 @@
"${BUILT_PRODUCTS_DIR}/Differentiator/Differentiator.framework",
"${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework",
"${BUILT_PRODUCTS_DIR}/R.swift.Library/Rswift.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",
Expand All @@ -2164,6 +2170,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Differentiator.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.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",
Expand All @@ -2188,6 +2195,7 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DownTests/Pods-DownTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
"${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework",
"${BUILT_PRODUCTS_DIR}/Quick/Quick.framework",
Expand All @@ -2196,6 +2204,7 @@
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework",
Expand Down Expand Up @@ -2530,6 +2539,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.DownKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down Expand Up @@ -2557,6 +2567,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.DownKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -2576,6 +2587,7 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.DownKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Down.app/Down";
};
name = Debug;
Expand All @@ -2593,6 +2605,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.DownKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Down.app/Down";
};
name = Release;
Expand Down Expand Up @@ -2728,6 +2741,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.Down;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -2744,6 +2758,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.Down;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -2763,6 +2778,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.DownTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Down.app/Down";
};
name = Debug;
Expand All @@ -2782,6 +2798,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.ruudputs.DownTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Down.app/Down";
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion Down/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var router: Router!

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
guard NSClassFromString("XCTest") == nil else {
return true
}
Expand Down
4 changes: 2 additions & 2 deletions Down/Shared/Extensions/UIViewConstraints.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ extension UIView {
}

private extension UIView {
func constraint(withAttribute attribute: NSLayoutAttribute) -> NSLayoutConstraint? {
func constraint(withAttribute attribute: NSLayoutConstraint.Attribute) -> NSLayoutConstraint? {
return constraints.first { $0.firstAttribute == attribute }
}

func constraint(withAttribute attribute: NSLayoutAttribute, toView view: UIView) -> NSLayoutConstraint? {
func constraint(withAttribute attribute: NSLayoutConstraint.Attribute, toView view: UIView) -> NSLayoutConstraint? {
return constraints.first { $0.firstAttribute == attribute && $0.secondItem as? UIView == view }
}
}
30 changes: 23 additions & 7 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
platform :ios, '11.0'
platform :ios, '12.0'
inhibit_all_warnings!

def rxswift_pods
pod 'RxSwift', '~> 4.3.0'
pod 'RxCocoa', '~> 4.3.0'
pod 'RxSwiftExt', '3.3.0'
pod 'RxSwift', '~> 4.4.0'
pod 'RxCocoa', '~> 4.4.0'
pod 'RxSwiftExt', '~> 3.4.0'
end

def rxswift_test_pods
pod 'RxBlocking', '~> 4.3.0'
pod 'RxBlocking', '~> 4.4.0'
end

def realm_pods
Expand Down Expand Up @@ -38,8 +38,8 @@ target 'Down' do
pod 'Crashlytics', '~> 3.11.0'

pod 'SkyFloatingLabelTextField', '~> 3.6.0'
pod 'CircleProgressView', '~> 1.1.0'
pod 'Kingfisher', '4.9.0'
pod 'CircleProgressView', '~> 1.2.0'
pod 'Kingfisher', '~> 4.10.0'

target 'DownTests' do
inherit! :search_paths
Expand All @@ -65,3 +65,19 @@ target 'DownKit' do
rxswift_test_pods
end
end


post_install do |installer|

# Targets to override the swift version to 4.0
# (which don't support swift 4.2 yet, but don't specifically set their swift version to 4.0 in the podspec)
swift4_override_targets = ['R.swift.Library']

installer.pods_project.targets.each do |target|
if swift4_override_targets.include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
end
65 changes: 37 additions & 28 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
PODS:
- Alamofire (4.7.3)
- CircleProgressView (1.1.3)
- CircleProgressView (1.2.0)
- Crashlytics (3.11.1):
- Fabric (~> 1.8.1)
- Differentiator (3.1.0)
- Fabric (1.8.2)
- Kingfisher (4.9.0)
- Kingfisher (4.10.1)
- Nimble (7.3.1)
- Quick (1.3.2)
- R.swift (4.0.0):
- R.swift.Library (~> 4.0.0)
- R.swift.Library (4.0.0)
- Realm (3.11.1):
- Realm/Headers (= 3.11.1)
- Realm/Headers (3.11.1)
- RealmSwift (3.11.1):
- Realm (= 3.11.1)
- RxBlocking (4.3.1):
- Realm (3.11.2):
- Realm/Headers (= 3.11.2)
- Realm/Headers (3.11.2)
- RealmSwift (3.11.2):
- Realm (= 3.11.2)
- RxAtomic (4.4.0)
- RxBlocking (4.4.0):
- RxAtomic (~> 4.4)
- RxSwift (~> 4.0)
- RxCocoa (4.3.1):
- RxCocoa (4.4.0):
- RxSwift (~> 4.0)
- RxDataSources (3.1.0):
- Differentiator (~> 3.0)
Expand All @@ -35,33 +37,38 @@ PODS:
- RxRealm (0.7.6):
- RealmSwift (~> 3.0)
- RxSwift (~> 4.0)
- RxSwift (4.3.1)
- RxSwiftExt (3.3.0):
- RxSwiftExt/Core (= 3.3.0)
- RxSwiftExt/Core (3.3.0):
- RxSwift (4.4.0):
- RxAtomic (~> 4.4)
- RxSwiftExt (3.4.0):
- RxSwiftExt/Core (= 3.4.0)
- RxSwiftExt/RxCocoa (= 3.4.0)
- RxSwiftExt/Core (3.4.0):
- RxSwift (~> 4.0)
- RxSwiftExt/RxCocoa (3.4.0):
- RxCocoa (~> 4.0)
- RxSwiftExt/Core
- SkyFloatingLabelTextField (3.6.0)
- SwiftHash (2.0.2)
- SwiftyJSON (4.2.0)

DEPENDENCIES:
- Alamofire (~> 4.7.0)
- CircleProgressView (~> 1.1.0)
- CircleProgressView (~> 1.2.0)
- Crashlytics (~> 3.11.0)
- Fabric (~> 1.8.0)
- Kingfisher (= 4.9.0)
- Kingfisher (~> 4.10.0)
- Nimble (~> 7.3.0)
- Quick (~> 1.3.0)
- R.swift (~> 4.0.0)
- R.swift.Library (~> 4.0.0)
- RealmSwift (~> 3.11.0)
- RxBlocking (~> 4.3.0)
- RxCocoa (~> 4.3.0)
- RxBlocking (~> 4.4.0)
- RxCocoa (~> 4.4.0)
- RxDataSources (~> 3.1.0)
- RxNimble (~> 4.4.0)
- RxRealm (~> 0.7.0)
- RxSwift (~> 4.3.0)
- RxSwiftExt (= 3.3.0)
- RxSwift (~> 4.4.0)
- RxSwiftExt (~> 3.4.0)
- SkyFloatingLabelTextField (~> 3.6.0)
- SwiftHash (~> 2.0.0)
- SwiftyJSON (~> 4.2.0)
Expand All @@ -80,6 +87,7 @@ SPEC REPOS:
- R.swift.Library
- Realm
- RealmSwift
- RxAtomic
- RxBlocking
- RxCocoa
- RxDataSources
Expand All @@ -93,28 +101,29 @@ SPEC REPOS:

SPEC CHECKSUMS:
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
CircleProgressView: 66e4d663a2bc7a9086e37b518868be923cd0a23a
CircleProgressView: 6b5b091d59dc5e5d2fda84e637a40498cdc39937
Crashlytics: ca7ab4bc304aa216bdc2e4c1a96389ee77252203
Differentiator: be49ca3408f0ecfc761e4c7763d20c62be01b9ad
Fabric: d2b22f443ba195d8a7cc204da230977c72733b40
Kingfisher: 64539b51826b778206daa6ed815d12653caa69dd
Kingfisher: c148cd7b47ebde9989f6bc7c27dcaa79d81279a0
Nimble: 04f732da099ea4d153122aec8c2a88fd0c7219ae
Quick: 2623cb30d7a7f41ca62f684f679586558f483d46
R.swift: d6a5ec2f55a8441dc0ed9f1f8b37d7d11ae85c66
R.swift.Library: c3af34921024333546e23b70e70d0b4e0cffca75
Realm: 037c5919b9ceb59d6beed5d3b031096856b119b3
RealmSwift: c9580133e73ef40ed340401af2dbc9a5790dfea7
RxBlocking: 64c051285261ca2339481e91b5f70eb06b03660a
RxCocoa: 78763c7b07d02455598d9fc3c1ad091a28b73635
Realm: 864477d028db77f7c5a0cba64a4892ad53db128a
RealmSwift: 12b8262fc08020b47de4fd88eb3d5c9425b34ec7
RxAtomic: eacf60db868c96bfd63320e28619fe29c179656f
RxBlocking: 138ad53217434444d6eeeb4fb406a45431d92e31
RxCocoa: df63ebf7b9a70d6b4eeea407ed5dd4efc8979749
RxDataSources: a843bad90c29817f5923ec8163f4af2de084ceb3
RxNimble: ba6caf0195c37fd50dd4b967624b66ff580d781a
RxRealm: 5379eddd74f8d617ca7681d1f8d144af25b432b0
RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4
RxSwiftExt: 81afb48ab0602f503147417baeb3989d64c7687d
RxSwift: 5976ecd04fc2fefd648827c23de5e11157faa973
RxSwiftExt: 01f8ecbeeb355698e9c75365ebe908b00dacf45d
SkyFloatingLabelTextField: 38164979b79512f9ff9288ad8acfc4bbf5d843e3
SwiftHash: 6d312abe61c8359bdef8d0093642f3a70b1c17ba
SwiftyJSON: c4bcba26dd9ec7a027fc8eade48e2c911f229e96

PODFILE CHECKSUM: 661872094361ec8227d3949692d5504b1eb93614
PODFILE CHECKSUM: 3e07610f9b4609e91f03c6796af4ce45775b4775

COCOAPODS: 1.5.3

0 comments on commit 5a76c6f

Please sign in to comment.