From 49cb0a4b240035f7d63b52956504661dcc6d6650 Mon Sep 17 00:00:00 2001 From: Leonid Zolotarev Date: Wed, 19 Jan 2022 21:22:49 -0500 Subject: [PATCH] Use latest RealmSwift --- .gitignore | 1 + Cartfile.resolved | 2 +- Example/IceCream_Example.xcodeproj/project.pbxproj | 4 ++-- IceCream.podspec | 4 ++-- IceCream.xcodeproj/project.pbxproj | 4 ++-- IceCream/Classes/CKRecordConvertible.swift | 7 ++++--- Package.resolved | 10 +++++----- Package.swift | 4 ++-- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 7661dbff..8846f54d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ profile DerivedData *.hmap *.ipa +.build # Bundler .bundle diff --git a/Cartfile.resolved b/Cartfile.resolved index 610ce7ef..ae678b73 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "realm/realm-cocoa" "v3.16.1" +github "realm/realm-cocoa" "v10.21.1" diff --git a/Example/IceCream_Example.xcodeproj/project.pbxproj b/Example/IceCream_Example.xcodeproj/project.pbxproj index 4f138c56..0eb99db9 100644 --- a/Example/IceCream_Example.xcodeproj/project.pbxproj +++ b/Example/IceCream_Example.xcodeproj/project.pbxproj @@ -401,7 +401,7 @@ repositoryURL = "https://github.com/realm/realm-cocoa.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 4.0.0; + minimumVersion = 10.21.1; }; }; E54B955E24A8C7A500A6D55A /* XCRemoteSwiftPackageReference "RxRealm" */ = { @@ -409,7 +409,7 @@ repositoryURL = "https://github.com/RxSwiftCommunity/RxRealm.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 2.0.0; + minimumVersion = 5.0.4; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/IceCream.podspec b/IceCream.podspec index 21e592d2..1f25309f 100644 --- a/IceCream.podspec +++ b/IceCream.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.social_media_url = 'https://twitter.com/caiyue5' - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '11.0' s.osx.deployment_target = '10.12' s.tvos.deployment_target = '10.0' s.watchos.deployment_target = '3.0' @@ -29,5 +29,5 @@ Pod::Spec.new do |s| s.static_framework = true s.swift_version = '5.0' - s.dependency 'RealmSwift', '< 10.0.0' + s.dependency 'RealmSwift', '~> 10.21' end diff --git a/IceCream.xcodeproj/project.pbxproj b/IceCream.xcodeproj/project.pbxproj index 99940f18..36d1e266 100644 --- a/IceCream.xcodeproj/project.pbxproj +++ b/IceCream.xcodeproj/project.pbxproj @@ -558,7 +558,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -615,7 +615,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; diff --git a/IceCream/Classes/CKRecordConvertible.swift b/IceCream/Classes/CKRecordConvertible.swift index 4bbfe8ac..79f30882 100644 --- a/IceCream/Classes/CKRecordConvertible.swift +++ b/IceCream/Classes/CKRecordConvertible.swift @@ -7,6 +7,7 @@ import Foundation import CloudKit +import Realm import RealmSwift public protocol CKRecordConvertible { @@ -116,10 +117,10 @@ extension CKRecordConvertible where Self: Object { case .object: /// We may get List here /// The item cannot be casted as List - /// It can be casted at a low-level type `ListBase` - guard let list = item as? ListBase, list.count > 0 else { break } + /// It can be casted at a low-level type `RLMSwiftCollectionBase` + guard let list = item as? RLMSwiftCollectionBase, list._rlmCollection.count > 0 else { break } var referenceArray = [CKRecord.Reference]() - let wrappedArray = list._rlmArray + let wrappedArray = list._rlmCollection for index in 0..