Skip to content

Commit

Permalink
Use latest RealmSwift
Browse files Browse the repository at this point in the history
  • Loading branch information
leoz committed Jan 20, 2022
1 parent 0817a25 commit 6f03345
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ profile
DerivedData
*.hmap
*.ipa
.build

# Bundler
.bundle
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "realm/realm-cocoa" "v3.16.1"
github "realm/realm-cocoa" "v10.21.1"
4 changes: 2 additions & 2 deletions Example/IceCream_Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,15 @@
repositoryURL = "https://github.com/realm/realm-cocoa.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.0.0;
minimumVersion = 10.21.1;
};
};
E54B955E24A8C7A500A6D55A /* XCRemoteSwiftPackageReference "RxRealm" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/RxSwiftCommunity/RxRealm.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.0.0;
minimumVersion = 5.0.4;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
4 changes: 2 additions & 2 deletions IceCream.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
4 changes: 2 additions & 2 deletions IceCream.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,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;
Expand Down Expand Up @@ -605,7 +605,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";
Expand Down
7 changes: 4 additions & 3 deletions IceCream/Classes/CKRecordConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation
import CloudKit
import Realm
import RealmSwift

public protocol CKRecordConvertible {
Expand Down Expand Up @@ -116,10 +117,10 @@ extension CKRecordConvertible where Self: Object {
case .object:
/// We may get List<Cat> here
/// The item cannot be casted as List<Object>
/// 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..<wrappedArray.count {
guard let object = wrappedArray[index] as? Object, let primaryKey = object.objectSchema.primaryKeyProperty?.name else { continue }
switch object.objectSchema.primaryKeyProperty?.type {
Expand Down
10 changes: 5 additions & 5 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"repositoryURL": "https://github.com/realm/realm-cocoa",
"state": {
"branch": null,
"revision": "11d7853b750f367525b174331e72f5431e15dfcc",
"version": "4.1.1"
"revision": "39177714b95bb5b1b29fffe28f1c7da77eef8e8b",
"version": "10.21.1"
}
},
{
"package": "RealmCore",
"package": "RealmDatabase",
"repositoryURL": "https://github.com/realm/realm-core",
"state": {
"branch": null,
"revision": "d2f6573960c84ebea3e0236047b3d976f95a5d7a",
"version": "5.23.6"
"revision": "f1976f0d96d9b06fbe0afbd60090b1c3966b1e23",
"version": "11.8.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription
let package = Package(
name: "IceCream",
platforms: [
.macOS(.v10_12), .iOS(.v10), .tvOS(.v10), .watchOS(.v3)
.macOS(.v10_12), .iOS(.v11), .tvOS(.v10), .watchOS(.v3)
],
products: [
.library(
Expand All @@ -14,7 +14,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/realm/realm-cocoa",
from: "4.1.1"
from: "10.21.1"
)
],
targets: [
Expand Down

0 comments on commit 6f03345

Please sign in to comment.