Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarinofaggiana <marino@marinofaggiana.com>2020-04-02 17:31:47 +0300
committermarinofaggiana <marino@marinofaggiana.com>2020-04-02 17:31:47 +0300
commite7ba4fd97430640b69159e7d6417898db72d613e (patch)
tree49b9da74b903b33a4b02e54e96024dd787dacdb7 /Carthage
parentb445c135e69a5a5b8172b0d2fbfaf375056b4318 (diff)
coding
Diffstat (limited to 'Carthage')
-rw-r--r--Carthage/Checkouts/realm-cocoa/.jenkins.yml327
-rw-r--r--Carthage/Checkouts/realm-cocoa/CHANGELOG.md47
-rw-r--r--Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability6
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift41
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration+Sync.mm4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.h4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.mm3
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist4
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/List.swift37
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift21
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Realm.swift8
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift4
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/RealmConfiguration.swift13
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift4
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/KVOTests.swift30
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift12
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/MigrationTests.swift2
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PerformanceTests.swift36
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PrimitiveListTests.swift18
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmCollectionTypeTests.swift30
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmTests.swift8
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift24
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/build.sh29
-rw-r--r--Carthage/Checkouts/realm-cocoa/dependencies.list4
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/scripts/package_examples.rb2
26 files changed, 269 insertions, 451 deletions
diff --git a/Carthage/Checkouts/realm-cocoa/.jenkins.yml b/Carthage/Checkouts/realm-cocoa/.jenkins.yml
index 864ef1c25..f83cea91f 100644
--- a/Carthage/Checkouts/realm-cocoa/.jenkins.yml
+++ b/Carthage/Checkouts/realm-cocoa/.jenkins.yml
@@ -4,12 +4,11 @@
# This is a generated file produced by scripts/pr-ci-matrix.rb.
xcode_version:
- - 10.0
- - 10.1
- 10.3
- 11.1
- 11.2.1
- 11.3
+ - 11.4
target:
- docs
- swiftlint
@@ -38,22 +37,6 @@ configuration:
exclude:
- - xcode_version: 10.0
- target: docs
- configuration: Debug
-
- - xcode_version: 10.0
- target: docs
- configuration: Release
-
- - xcode_version: 10.1
- target: docs
- configuration: Debug
-
- - xcode_version: 10.1
- target: docs
- configuration: Release
-
- xcode_version: 10.3
target: docs
configuration: Debug
@@ -82,22 +65,14 @@ exclude:
target: docs
configuration: Debug
- - xcode_version: 10.0
- target: swiftlint
- configuration: Debug
-
- - xcode_version: 10.0
- target: swiftlint
+ - xcode_version: 11.3
+ target: docs
configuration: Release
- - xcode_version: 10.1
- target: swiftlint
+ - xcode_version: 11.4
+ target: docs
configuration: Debug
- - xcode_version: 10.1
- target: swiftlint
- configuration: Release
-
- xcode_version: 10.3
target: swiftlint
configuration: Debug
@@ -126,25 +101,17 @@ exclude:
target: swiftlint
configuration: Debug
- - xcode_version: 10.0
- target: osx-encryption
- configuration: Debug
-
- - xcode_version: 10.1
- target: osx-encryption
- configuration: Debug
-
- - xcode_version: 10.1
- target: osx-encryption
+ - xcode_version: 11.3
+ target: swiftlint
configuration: Release
- - xcode_version: 10.3
- target: osx-encryption
+ - xcode_version: 11.4
+ target: swiftlint
configuration: Debug
- xcode_version: 10.3
target: osx-encryption
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: osx-encryption
@@ -166,25 +133,17 @@ exclude:
target: osx-encryption
configuration: Debug
- - xcode_version: 10.0
- target: osx-object-server
- configuration: Debug
-
- - xcode_version: 10.1
- target: osx-object-server
- configuration: Debug
-
- - xcode_version: 10.1
- target: osx-object-server
+ - xcode_version: 11.3
+ target: osx-encryption
configuration: Release
- - xcode_version: 10.3
- target: osx-object-server
+ - xcode_version: 11.4
+ target: osx-encryption
configuration: Debug
- xcode_version: 10.3
target: osx-object-server
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: osx-object-server
@@ -206,25 +165,17 @@ exclude:
target: osx-object-server
configuration: Debug
- - xcode_version: 10.0
- target: ios-static
- configuration: Debug
-
- - xcode_version: 10.1
- target: ios-static
- configuration: Debug
-
- - xcode_version: 10.1
- target: ios-static
+ - xcode_version: 11.3
+ target: osx-object-server
configuration: Release
- - xcode_version: 10.3
- target: ios-static
+ - xcode_version: 11.4
+ target: osx-object-server
configuration: Debug
- xcode_version: 10.3
target: ios-static
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: ios-static
@@ -246,25 +197,17 @@ exclude:
target: ios-static
configuration: Debug
- - xcode_version: 10.0
- target: ios-dynamic
- configuration: Debug
-
- - xcode_version: 10.1
- target: ios-dynamic
- configuration: Debug
-
- - xcode_version: 10.1
- target: ios-dynamic
+ - xcode_version: 11.3
+ target: ios-static
configuration: Release
- - xcode_version: 10.3
- target: ios-dynamic
+ - xcode_version: 11.4
+ target: ios-static
configuration: Debug
- xcode_version: 10.3
target: ios-dynamic
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: ios-dynamic
@@ -286,25 +229,17 @@ exclude:
target: ios-dynamic
configuration: Debug
- - xcode_version: 10.0
- target: watchos
- configuration: Debug
-
- - xcode_version: 10.1
- target: watchos
- configuration: Debug
-
- - xcode_version: 10.1
- target: watchos
+ - xcode_version: 11.3
+ target: ios-dynamic
configuration: Release
- - xcode_version: 10.3
- target: watchos
+ - xcode_version: 11.4
+ target: ios-dynamic
configuration: Debug
- xcode_version: 10.3
target: watchos
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: watchos
@@ -326,25 +261,17 @@ exclude:
target: watchos
configuration: Debug
- - xcode_version: 10.0
- target: tvos
- configuration: Debug
-
- - xcode_version: 10.1
- target: tvos
- configuration: Debug
-
- - xcode_version: 10.1
- target: tvos
+ - xcode_version: 11.3
+ target: watchos
configuration: Release
- - xcode_version: 10.3
- target: tvos
+ - xcode_version: 11.4
+ target: watchos
configuration: Debug
- xcode_version: 10.3
target: tvos
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: tvos
@@ -366,25 +293,17 @@ exclude:
target: tvos
configuration: Debug
- - xcode_version: 10.0
- target: ios-swift
- configuration: Debug
-
- - xcode_version: 10.1
- target: ios-swift
- configuration: Debug
-
- - xcode_version: 10.1
- target: ios-swift
+ - xcode_version: 11.3
+ target: tvos
configuration: Release
- - xcode_version: 10.3
- target: ios-swift
+ - xcode_version: 11.4
+ target: tvos
configuration: Debug
- xcode_version: 10.3
target: ios-swift
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: ios-swift
@@ -406,25 +325,17 @@ exclude:
target: ios-swift
configuration: Debug
- - xcode_version: 10.0
- target: tvos-swift
- configuration: Debug
-
- - xcode_version: 10.1
- target: tvos-swift
- configuration: Debug
-
- - xcode_version: 10.1
- target: tvos-swift
+ - xcode_version: 11.3
+ target: ios-swift
configuration: Release
- - xcode_version: 10.3
- target: tvos-swift
+ - xcode_version: 11.4
+ target: ios-swift
configuration: Debug
- xcode_version: 10.3
target: tvos-swift
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: tvos-swift
@@ -446,22 +357,14 @@ exclude:
target: tvos-swift
configuration: Debug
- - xcode_version: 10.0
- target: catalyst
- configuration: Debug
-
- - xcode_version: 10.0
- target: catalyst
+ - xcode_version: 11.3
+ target: tvos-swift
configuration: Release
- - xcode_version: 10.1
- target: catalyst
+ - xcode_version: 11.4
+ target: tvos-swift
configuration: Debug
- - xcode_version: 10.1
- target: catalyst
- configuration: Release
-
- xcode_version: 10.3
target: catalyst
configuration: Debug
@@ -478,22 +381,10 @@ exclude:
target: catalyst
configuration: Debug
- - xcode_version: 10.0
- target: catalyst-swift
- configuration: Debug
-
- - xcode_version: 10.0
- target: catalyst-swift
- configuration: Release
-
- - xcode_version: 10.1
- target: catalyst-swift
+ - xcode_version: 11.3
+ target: catalyst
configuration: Debug
- - xcode_version: 10.1
- target: catalyst-swift
- configuration: Release
-
- xcode_version: 10.3
target: catalyst-swift
configuration: Debug
@@ -510,12 +401,8 @@ exclude:
target: catalyst-swift
configuration: Debug
- - xcode_version: 10.0
- target: cocoapods-osx
- configuration: Debug
-
- - xcode_version: 10.1
- target: cocoapods-osx
+ - xcode_version: 11.3
+ target: catalyst-swift
configuration: Debug
- xcode_version: 10.3
@@ -534,26 +421,14 @@ exclude:
target: cocoapods-osx
configuration: Debug
- - xcode_version: 10.0
- target: cocoapods-ios
- configuration: Debug
-
- - xcode_version: 10.1
- target: cocoapods-ios
+ - xcode_version: 11.4
+ target: cocoapods-osx
configuration: Debug
- - xcode_version: 10.1
- target: cocoapods-ios
- configuration: Release
-
- xcode_version: 10.3
target: cocoapods-ios
configuration: Debug
- - xcode_version: 10.3
- target: cocoapods-ios
- configuration: Release
-
- xcode_version: 11.1
target: cocoapods-ios
configuration: Debug
@@ -574,25 +449,17 @@ exclude:
target: cocoapods-ios
configuration: Debug
- - xcode_version: 10.0
- target: cocoapods-ios-dynamic
- configuration: Debug
-
- - xcode_version: 10.1
- target: cocoapods-ios-dynamic
- configuration: Debug
-
- - xcode_version: 10.1
- target: cocoapods-ios-dynamic
+ - xcode_version: 11.3
+ target: cocoapods-ios
configuration: Release
- - xcode_version: 10.3
- target: cocoapods-ios-dynamic
+ - xcode_version: 11.4
+ target: cocoapods-ios
configuration: Debug
- xcode_version: 10.3
target: cocoapods-ios-dynamic
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: cocoapods-ios-dynamic
@@ -614,25 +481,17 @@ exclude:
target: cocoapods-ios-dynamic
configuration: Debug
- - xcode_version: 10.0
- target: cocoapods-watchos
- configuration: Debug
-
- - xcode_version: 10.1
- target: cocoapods-watchos
- configuration: Debug
-
- - xcode_version: 10.1
- target: cocoapods-watchos
+ - xcode_version: 11.3
+ target: cocoapods-ios-dynamic
configuration: Release
- - xcode_version: 10.3
- target: cocoapods-watchos
+ - xcode_version: 11.4
+ target: cocoapods-ios-dynamic
configuration: Debug
- xcode_version: 10.3
target: cocoapods-watchos
- configuration: Release
+ configuration: Debug
- xcode_version: 11.1
target: cocoapods-watchos
@@ -654,22 +513,14 @@ exclude:
target: cocoapods-watchos
configuration: Debug
- - xcode_version: 10.0
- target: swiftpm
- configuration: Debug
-
- - xcode_version: 10.0
- target: swiftpm
+ - xcode_version: 11.3
+ target: cocoapods-watchos
configuration: Release
- - xcode_version: 10.1
- target: swiftpm
+ - xcode_version: 11.4
+ target: cocoapods-watchos
configuration: Debug
- - xcode_version: 10.1
- target: swiftpm
- configuration: Release
-
- xcode_version: 10.3
target: swiftpm
configuration: Debug
@@ -686,22 +537,10 @@ exclude:
target: swiftpm
configuration: Debug
- - xcode_version: 10.0
- target: swiftpm-address
- configuration: Debug
-
- - xcode_version: 10.0
- target: swiftpm-address
- configuration: Release
-
- - xcode_version: 10.1
- target: swiftpm-address
+ - xcode_version: 11.3
+ target: swiftpm
configuration: Debug
- - xcode_version: 10.1
- target: swiftpm-address
- configuration: Release
-
- xcode_version: 10.3
target: swiftpm-address
configuration: Debug
@@ -730,22 +569,14 @@ exclude:
target: swiftpm-address
configuration: Debug
- - xcode_version: 10.0
- target: swiftpm-thread
- configuration: Debug
-
- - xcode_version: 10.0
- target: swiftpm-thread
+ - xcode_version: 11.3
+ target: swiftpm-address
configuration: Release
- - xcode_version: 10.1
- target: swiftpm-thread
+ - xcode_version: 11.4
+ target: swiftpm-address
configuration: Debug
- - xcode_version: 10.1
- target: swiftpm-thread
- configuration: Release
-
- xcode_version: 10.3
target: swiftpm-thread
configuration: Debug
@@ -773,3 +604,11 @@ exclude:
- xcode_version: 11.3
target: swiftpm-thread
configuration: Debug
+
+ - xcode_version: 11.3
+ target: swiftpm-thread
+ configuration: Release
+
+ - xcode_version: 11.4
+ target: swiftpm-thread
+ configuration: Debug
diff --git a/Carthage/Checkouts/realm-cocoa/CHANGELOG.md b/Carthage/Checkouts/realm-cocoa/CHANGELOG.md
index e918effe7..e184214d7 100644
--- a/Carthage/Checkouts/realm-cocoa/CHANGELOG.md
+++ b/Carthage/Checkouts/realm-cocoa/CHANGELOG.md
@@ -1,3 +1,50 @@
+4.4.0 Release notes (2020-03-26)
+=============================================================
+
+Swift 4.0 and Xcode 10.3 are now the minimum supported versions.
+
+### Enhancements
+
+* Allow setting the `fileUrl` for synchronized Realms. An appropriate local
+ path based on the sync URL will still be used if it is not overridden.
+ ([PR #6454](https://github.com/realm/realm-cocoa/pull/6454)).
+* Add Xcode 11.4 binaries to the release package.
+
+### Fixed
+
+* None.
+
+### Compatibility
+
+* File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
+* Realm Object Server: 3.21.0 or later.
+* Carthage release for Swift is built with Xcode 11.4.
+
+4.3.2 Release notes (2020-02-06)
+=============================================================
+
+### Enhancements
+
+* Similar to `autoreleasepool()`, `realm.write()` now returns the value which
+ the block passed to it returns. Returning `Void` from the block is still allowed.
+
+### Fixed
+
+* Fix a memory leak attributed to `property_copyAttributeList` the first time a
+ Realm is opened when using Realm Swift. ([#6409](https://github.com/realm/realm-cocoa/issues/6409), since 4.0.0).
+* Connecting to a `realms:` sync URL would crash at runtime on iOS 11 (and no
+ other iOS versions) inside the SSL validation code. (Since 4.3.1).
+
+### Compatibility
+
+* File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
+* Realm Object Server: 3.21.0 or later.
+* Carthage release for Swift is built with Xcode 11.3.
+
+### Internal
+
+* Upgraded realm-sync from 4.9.4 to 4.9.5.
+
4.3.1 Release notes (2020-01-16)
=============================================================
diff --git a/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability b/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability
index 07889287b..35b9b065e 100644
--- a/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability
+++ b/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability
@@ -1,9 +1,9 @@
-xcodeVersions = ['10.0', '10.1', '10.3', '11.1', '11.2.1', '11.3']
+xcodeVersions = ['10.3', '11.1', '11.2.1', '11.3', '11.4']
platforms = ['osx', 'ios', 'watchos', 'tvos', 'catalyst']
carthagePlatforms = ['osx', 'ios', 'watchos', 'tvos']
platformNames = ['osx': 'macOS', 'ios': 'iOS', 'watchos': 'watchOS', 'tvos': 'tvOS', 'catalyst': 'Catalyst']
-carthageXcodeVersion = '11.3'
-objcXcodeVersion = '10.1'
+carthageXcodeVersion = '11.4'
+objcXcodeVersion = '10.3'
docsSwiftVersion = '5.1.2'
def installationTest(platform, test, language) {
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift
index 24ae51d26..6d274ce66 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift
@@ -302,6 +302,41 @@ class SwiftObjectServerTests: SwiftSyncTestCase {
XCTAssertFalse(RLMHasCachedRealmForPath(pathOnDisk))
}
+ func testDownloadRealmToCustomPath() {
+ let user = try! synchronouslyLogInUser(for: basicCredentials(register: isParent), server: authURL)
+ if !isParent {
+ populateRealm(user: user, url: realmURL)
+ return
+ }
+
+ // Wait for the child process to upload everything.
+ executeChild()
+
+ let ex = expectation(description: "download-realm")
+ let customFileURL = realmURLForFile("copy")
+ var config = user.configuration(realmURL: realmURL, fullSynchronization: true)
+ config.fileURL = customFileURL
+ let pathOnDisk = ObjectiveCSupport.convert(object: config).pathOnDisk
+ XCTAssertEqual(pathOnDisk, customFileURL.path)
+ XCTAssertFalse(FileManager.default.fileExists(atPath: pathOnDisk))
+ Realm.asyncOpen(configuration: config) { realm, error in
+ XCTAssertNil(error)
+ self.checkCount(expected: self.bigObjectCount, realm!, SwiftHugeSyncObject.self)
+ ex.fulfill()
+ }
+ func fileSize(path: String) -> Int {
+ if let attr = try? FileManager.default.attributesOfItem(atPath: path) {
+ return attr[.size] as! Int
+ }
+ return 0
+ }
+ XCTAssertFalse(RLMHasCachedRealmForPath(pathOnDisk))
+ waitForExpectations(timeout: 10.0, handler: nil)
+ XCTAssertGreaterThan(fileSize(path: pathOnDisk), 0)
+ XCTAssertFalse(RLMHasCachedRealmForPath(pathOnDisk))
+ }
+
+
func testCancelDownloadRealm() {
let user = try! synchronouslyLogInUser(for: basicCredentials(register: isParent), server: authURL)
if !isParent {
@@ -578,4 +613,10 @@ class SwiftObjectServerTests: SwiftSyncTestCase {
_ = try! Realm(configuration: config)
self.waitForExpectations(timeout: 4.0)
}
+
+ private func realmURLForFile(_ fileName: String) -> URL {
+ let testDir = RLMRealmPathForFile("realm-object-server")
+ let directory = URL(fileURLWithPath: testDir, isDirectory: true)
+ return directory.appendingPathComponent(fileName, isDirectory: false)
+ }
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm
index 2ec9b2b58..eff299428 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm
@@ -29,6 +29,7 @@
#import "RLMProperty.h"
#import "RLMProperty_Private.h"
#import "RLMQueryUtil.hpp"
+#import "RLMRealmConfiguration+Sync.h"
#import "RLMRealmConfiguration_Private.hpp"
#import "RLMRealmUtil.hpp"
#import "RLMSchema_Private.hpp"
@@ -402,6 +403,7 @@ REALM_NOINLINE static void translateSharedGroupOpenException(RLMRealmConfigurati
case RealmFileException::Kind::IncompatibleSyncedRealm: {
RLMRealmConfiguration *configuration = [originalConfiguration copy];
configuration.fileURL = [NSURL fileURLWithPath:@(ex.path().data())];
+ configuration.syncConfiguration = nil;
configuration.readOnly = YES;
NSError *intermediateError = RLMMakeError(RLMErrorIncompatibleSyncedFile, ex);
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration+Sync.mm b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration+Sync.mm
index 36721d882..9d5fbcdd0 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration+Sync.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration+Sync.mm
@@ -33,6 +33,10 @@
#pragma mark - API
- (void)setSyncConfiguration:(RLMSyncConfiguration *)syncConfiguration {
+ if (syncConfiguration == nil) {
+ self.config.sync_config = nullptr;
+ return;
+ }
if (self.config.should_compact_on_launch_function) {
@throw RLMException(@"Cannot set `syncConfiguration` when `shouldCompactOnLaunch` is set.");
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.h
index 3ec8fd55c..8b603f347 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.h
@@ -66,8 +66,8 @@ typedef BOOL (^RLMShouldCompactOnLaunchBlock)(NSUInteger totalBytes, NSUInteger
#pragma mark - Properties
-/// The local URL of the Realm file. Mutually exclusive with `inMemoryIdentifier` and `syncConfiguration`;
-/// setting any one of the three properties will automatically nil out the other two.
+/// The local URL of the Realm file. Mutually exclusive with `inMemoryIdentifier`;
+/// setting one of the two properties will automatically nil out the other.
@property (nonatomic, copy, nullable) NSURL *fileURL;
/// A string used to identify a particular in-memory Realm. Mutually exclusive with `fileURL` and `syncConfiguration`;
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.mm b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.mm
index 114b8d6b3..bca911d21 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealmConfiguration.mm
@@ -153,7 +153,7 @@ static void RLMNSStringToStdString(std::string &out, NSString *in) {
}
- (NSURL *)fileURL {
- if (_config.in_memory || _config.sync_config) {
+ if (_config.in_memory) {
return nil;
}
return [NSURL fileURLWithPath:@(_config.path.c_str())];
@@ -164,7 +164,6 @@ static void RLMNSStringToStdString(std::string &out, NSString *in) {
if (path.length == 0) {
@throw RLMException(@"Realm path must not be empty");
}
- _config.sync_config = nullptr;
RLMNSStringToStdString(_config.path, path);
_config.in_memory = false;
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist b/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist
index 3e3045b88..d2f4bbfaf 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>4.3.1</string>
+ <string>4.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>4.3.1</string>
+ <string>4.4.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Realm. All rights reserved.</string>
<key>NSPrincipalClass</key>
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/List.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/List.swift
index 81e58998f..cc9acd32b 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/List.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/List.swift
@@ -494,7 +494,6 @@ extension List: RealmCollection {
return _rlmArray
}
-#if swift(>=4)
/**
Replace the given `subRange` of elements with `newElements`.
@@ -511,23 +510,6 @@ extension List: RealmCollection {
insert(x, at: subrange.lowerBound)
}
}
-#else
- /**
- Replace the given `subRange` of elements with `newElements`.
-
- - parameter subrange: The range of elements to be replaced.
- - parameter newElements: The new elements to be inserted into the List.
- */
- public func replaceSubrange<C: Collection>(_ subrange: Range<Int>, with newElements: C)
- where C.Iterator.Element == Element {
- for _ in subrange.lowerBound..<subrange.upperBound {
- remove(at: subrange.lowerBound)
- }
- for x in newElements.reversed() {
- insert(x, at: subrange.lowerBound)
- }
- }
-#endif
/// The position of the first element in a non-empty collection.
/// Identical to endIndex in an empty collection.
@@ -550,7 +532,6 @@ extension List: RealmCollection {
}
}
-#if swift(>=4.0)
// MARK: - MutableCollection conformance, range replaceable collection emulation
extension List: MutableCollection {
#if swift(>=4.1)
@@ -698,24 +679,6 @@ extension List: MutableCollection {
}
#endif
}
-#else
-// MARK: - RangeReplaceableCollection support
-extension List: RangeReplaceableCollection {
- /**
- Removes the last object in the list. The object is not removed from the Realm that manages it.
-
- - warning: This method may only be called during a write transaction.
- */
- public func removeLast() {
- guard _rlmArray.count > 0 else {
- throwRealmException("It is not possible to remove an object from an empty list.")
- return
- }
- _rlmArray.removeLastObject()
- }
-
-}
-#endif
// MARK: - Codable
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift
index 4d29ab5f9..3cb6852eb 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift
@@ -650,18 +650,12 @@ internal class ObjectUtil {
// one named 'x', and another that is optional and is named 'x.storage'. Note
// that '.' is illegal in either a Swift or Objective-C property name.
if let storageRange = name.range(of: ".storage", options: [.anchored, .backwards]) {
- #if swift(>=4.0)
- return String(name[..<storageRange.lowerBound])
- #else
- return name.substring(to: storageRange.lowerBound)
- #endif
+ return String(name[..<storageRange.lowerBound])
}
// Xcode 11 changed the name of the storage property to "$__lazy_storage_$_propName"
- #if swift(>=4.0)
- if let storageRange = name.range(of: "$__lazy_storage_$_", options: [.anchored]) {
- return String(name[storageRange.upperBound...])
- }
- #endif
+ if let storageRange = name.range(of: "$__lazy_storage_$_", options: [.anchored]) {
+ return String(name[storageRange.upperBound...])
+ }
return nil
}
@@ -736,6 +730,9 @@ internal class ObjectUtil {
if let objcProp = class_getProperty(cls, label) {
var count: UInt32 = 0
let attrs = property_copyAttributeList(objcProp, &count)!
+ defer {
+ free(attrs)
+ }
var computed = true
for i in 0..<Int(count) {
let attr = attrs[i]
@@ -780,11 +777,11 @@ private func forceCastToInferred<T, V>(_ x: T) -> V {
}
extension Object: AssistedObjectiveCBridgeable {
- static func bridging(from objectiveCValue: Any, with metadata: Any?) -> Self {
+ internal static func bridging(from objectiveCValue: Any, with metadata: Any?) -> Self {
return forceCastToInferred(objectiveCValue)
}
- var bridged: (objectiveCValue: Any, metadata: Any?) {
+ internal var bridged: (objectiveCValue: Any, metadata: Any?) {
return (objectiveCValue: unsafeCastToRLMObject(), metadata: nil)
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Realm.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Realm.swift
index 4ef7ea736..20329d04f 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Realm.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Realm.swift
@@ -203,19 +203,23 @@ public struct Realm {
notified for the changes made in this write transaction.
- parameter block: The block containing actions to perform.
+ - returns: The value returned from the block, if any.
- throws: An `NSError` if the transaction could not be completed successfully.
If `block` throws, the function throws the propagated `ErrorType` instead.
*/
- public func write(withoutNotifying tokens: [NotificationToken] = [], _ block: (() throws -> Void)) throws {
+ @discardableResult
+ public func write<Result>(withoutNotifying tokens: [NotificationToken] = [], _ block: (() throws -> Result)) throws -> Result {
beginWrite()
+ var ret: Result!
do {
- try block()
+ ret = try block()
} catch let error {
if isInWriteTransaction { cancelWrite() }
throw error
}
if isInWriteTransaction { try commitWrite(withoutNotifying: tokens) }
+ return ret
}
/**
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift
index be5e3dbce..ba03f0131 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift
@@ -1022,12 +1022,12 @@ private struct AnyRealmCollectionBridgingMetadata<T: RealmCollectionValue> {
}
extension AnyRealmCollection: AssistedObjectiveCBridgeable {
- static func bridging(from objectiveCValue: Any, with metadata: Any?) -> AnyRealmCollection {
+ internal static func bridging(from objectiveCValue: Any, with metadata: Any?) -> AnyRealmCollection {
guard let metadata = metadata as? AnyRealmCollectionBridgingMetadata<Element> else { preconditionFailure() }
return AnyRealmCollection(base: metadata.baseType.bridging(from: objectiveCValue, with: metadata.baseMetadata))
}
- var bridged: (objectiveCValue: Any, metadata: Any?) {
+ internal var bridged: (objectiveCValue: Any, metadata: Any?) {
return (
objectiveCValue: base.bridged.objectiveCValue,
metadata: AnyRealmCollectionBridgingMetadata(baseMetadata: base.bridged.metadata, baseType: type(of: base))
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmConfiguration.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmConfiguration.swift
index 6ca3edf39..19b60cd25 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmConfiguration.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmConfiguration.swift
@@ -112,11 +112,10 @@ extension Realm {
/**
A configuration value used to configure a Realm for synchronization with the Realm Object Server. Mutually
- exclusive with `inMemoryIdentifier` and `fileURL`.
+ exclusive with `inMemoryIdentifier`.
*/
public var syncConfiguration: SyncConfiguration? {
set {
- _path = nil
_inMemoryIdentifier = nil
_syncConfiguration = newValue
}
@@ -127,11 +126,10 @@ extension Realm {
private var _syncConfiguration: SyncConfiguration?
- /// The local URL of the Realm file. Mutually exclusive with `inMemoryIdentifier` and `syncConfiguration`.
+ /// The local URL of the Realm file. Mutually exclusive with `inMemoryIdentifier`.
public var fileURL: URL? {
set {
_inMemoryIdentifier = nil
- _syncConfiguration = nil
_path = newValue?.path
}
get {
@@ -217,13 +215,14 @@ extension Realm {
internal var rlmConfiguration: RLMRealmConfiguration {
let configuration = RLMRealmConfiguration()
+ if let syncConfiguration = syncConfiguration {
+ configuration.syncConfiguration = syncConfiguration.asConfig()
+ }
if let fileURL = fileURL {
configuration.fileURL = fileURL
} else if let inMemoryIdentifier = inMemoryIdentifier {
configuration.inMemoryIdentifier = inMemoryIdentifier
- } else if let syncConfiguration = syncConfiguration {
- configuration.syncConfiguration = syncConfiguration.asConfig()
- } else {
+ } else if syncConfiguration == nil {
fatalError("A Realm Configuration must specify a path or an in-memory identifier.")
}
configuration.encryptionKey = self.encryptionKey
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift
index c113912e9..15b7aaf04 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift
@@ -408,11 +408,11 @@ extension Results: RealmCollection {
// MARK: AssistedObjectiveCBridgeable
extension Results: AssistedObjectiveCBridgeable {
- static func bridging(from objectiveCValue: Any, with metadata: Any?) -> Results {
+ internal static func bridging(from objectiveCValue: Any, with metadata: Any?) -> Results {
return Results(objectiveCValue as! RLMResults)
}
- var bridged: (objectiveCValue: Any, metadata: Any?) {
+ internal var bridged: (objectiveCValue: Any, metadata: Any?) {
return (objectiveCValue: rlmResults, metadata: nil)
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/KVOTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/KVOTests.swift
index 35ca79f77..db6246dc1 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/KVOTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/KVOTests.swift
@@ -123,20 +123,36 @@ class KVOTests: TestCase {
changeDictionary = nil
}
- func observeChange<T: Equatable>(_ obj: SwiftKVOObject, _ keyPath: KeyPath<SwiftKVOObject, T>, _ old: Any?, _ new: Any?,
+ func observeChange<T: Equatable>(_ obj: SwiftKVOObject, _ keyPath: KeyPath<SwiftKVOObject, T>, _ old: T, _ new: T,
fileName: StaticString = #file, lineNumber: UInt = #line, _ block: () -> Void) {
let kvoOptions: NSKeyValueObservingOptions = [.old, .new]
var gotNotification = false
let observation = obj.observe(keyPath, options: kvoOptions) { _, change in
- if let old = old {
- XCTAssertEqual(change.oldValue, (old as! T), file: fileName, line: lineNumber)
+ XCTAssertEqual(change.oldValue, old, file: fileName, line: lineNumber)
+ XCTAssertEqual(change.newValue, new, file: fileName, line: lineNumber)
+ gotNotification = true
+ }
+
+ block()
+ observation.invalidate()
+
+ XCTAssertTrue(gotNotification, file: fileName, line: lineNumber)
+ }
+
+ func observeChange<T: Equatable>(_ obj: SwiftKVOObject, _ keyPath: KeyPath<SwiftKVOObject, T?>, _ old: T?, _ new: T?,
+ fileName: StaticString = #file, lineNumber: UInt = #line, _ block: () -> Void) {
+ let kvoOptions: NSKeyValueObservingOptions = [.old, .new]
+ var gotNotification = false
+ let observation = obj.observe(keyPath, options: kvoOptions) { _, change in
+ if let oldValue = change.oldValue {
+ XCTAssertEqual(oldValue, old, file: fileName, line: lineNumber)
} else {
- XCTAssertNil(change.oldValue, file: fileName, line: lineNumber)
+ XCTAssertNil(old, file: fileName, line: lineNumber)
}
- if let new = new {
- XCTAssertEqual(change.newValue, (new as! T), file: fileName, line: lineNumber)
+ if let newValue = change.newValue {
+ XCTAssertEqual(newValue, new, file: fileName, line: lineNumber)
} else {
- XCTAssertNil(change.newValue, file: fileName, line: lineNumber)
+ XCTAssertNil(new, file: fileName, line: lineNumber)
}
gotNotification = true
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift
index 99c30d2dd..be1a4b980 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift
@@ -75,7 +75,6 @@ class ListTests: TestCase {
super.tearDown()
}
-#if swift(>=4)
override class var defaultTestSuite: XCTestSuite {
// Don't run tests for the base class
if isEqual(ListTests.self) {
@@ -83,15 +82,6 @@ class ListTests: TestCase {
}
return super.defaultTestSuite
}
-#else
- override class func defaultTestSuite() -> XCTestSuite {
- // Don't run tests for the base class
- if isEqual(ListTests.self) {
- return XCTestSuite(name: "empty")
- }
- return super.defaultTestSuite()
- }
-#endif
func testPrimitive() {
let obj = SwiftListObject()
@@ -723,7 +713,6 @@ class ListRRCMethodsTests: XCTestCase {
array = makeArray(from: list)
}
-#if swift(>=4.0)
func testSubscript() {
list[1..<4] = createListObject([10, 11, 12]).intArray[0..<2]
array[1..<4] = [10, 11]
@@ -741,7 +730,6 @@ class ListRRCMethodsTests: XCTestCase {
list.removeSubrange(list.indices)
XCTAssertTrue(list.isEmpty)
}
-#endif
func testRemoveFirst() {
list.removeFirst()
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/MigrationTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/MigrationTests.swift
index 2dbac2fb2..da2ba304c 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/MigrationTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/MigrationTests.swift
@@ -194,7 +194,7 @@ class MigrationTests: TestCase {
XCTAssertEqual(count, 1)
}
- autoreleasepool {
+ _ = autoreleasepool {
try! Realm().write {
try! Realm().create(SwiftArrayPropertyObject.self, value: ["string", [["array"]], [[2]]])
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PerformanceTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PerformanceTests.swift
index c9f07323f..56ad3a8fe 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PerformanceTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PerformanceTests.swift
@@ -37,7 +37,6 @@ private var largeRealm: Realm!
private let isRunningOnDevice = TARGET_IPHONE_SIMULATOR == 0
class SwiftPerformanceTests: TestCase {
-#if swift(>=4)
override class var defaultTestSuite: XCTestSuite {
#if !DEBUG && os(iOS)
if isRunningOnDevice {
@@ -46,16 +45,6 @@ class SwiftPerformanceTests: TestCase {
#endif
return XCTestSuite(name: "SwiftPerformanceTests")
}
-#else
- override class func defaultTestSuite() -> XCTestSuite {
-#if !DEBUG && os(iOS) && !TARGET_OS_MACCATALYST
- if isRunningOnDevice {
- return super.defaultTestSuite()
- }
-#endif
- return XCTestSuite(name: "SwiftPerformanceTests")
- }
-#endif
override class func setUp() {
super.setUp()
@@ -77,7 +66,6 @@ class SwiftPerformanceTests: TestCase {
// Do nothing, as we need to keep our in-memory realms around between tests
}
-#if swift(>=4)
override func measure(_ block: (() -> Void)) {
super.measure {
autoreleasepool {
@@ -100,30 +88,6 @@ class SwiftPerformanceTests: TestCase {
}
}
-#else
- override func measure(_ block: @escaping (() -> Void)) {
- super.measure {
- autoreleasepool {
- block()
- }
- }
- }
-
- override func measureMetrics(_ metrics: [String], automaticallyStartMeasuring: Bool, for block: @escaping () -> Void) {
- super.measureMetrics(metrics, automaticallyStartMeasuring: automaticallyStartMeasuring) {
- autoreleasepool {
- block()
- }
- }
- }
-
- func inMeasureBlock(block: @escaping () -> Void) {
- measureMetrics(type(of: self).defaultPerformanceMetrics(), automaticallyStartMeasuring: false) {
- _ = block()
- }
- }
-#endif
-
private func copyRealmToTestPath(_ realm: Realm) -> Realm {
do {
try FileManager.default.removeItem(at: testRealmURL())
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PrimitiveListTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PrimitiveListTests.swift
index 17a221435..c740d9ca5 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PrimitiveListTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/PrimitiveListTests.swift
@@ -265,15 +265,9 @@ class PrimitiveListTestsBase<O: ObjectFactory, V: ValueFactory>: TestCase {
var array: List<V.T>!
var values: [V.T]!
-#if swift(>=4)
class func _defaultTestSuite() -> XCTestSuite {
return defaultTestSuite
}
-#else
- class func _defaultTestSuite() -> XCTestSuite {
- return defaultTestSuite()
- }
-#endif
override func setUp() {
obj = SwiftListObject()
@@ -685,15 +679,9 @@ class UnmanagedPrimitiveListTests: TestCase {
return suite
}
-#if swift(>=4)
override class var defaultTestSuite: XCTestSuite {
return _defaultTestSuite()
}
-#else
- override class func defaultTestSuite() -> XCTestSuite {
- return _defaultTestSuite()
- }
-#endif
}
class ManagedPrimitiveListTests: TestCase {
@@ -724,13 +712,7 @@ class ManagedPrimitiveListTests: TestCase {
return suite
}
-#if swift(>=4)
override class var defaultTestSuite: XCTestSuite {
return _defaultTestSuite()
}
-#else
- override class func defaultTestSuite() -> XCTestSuite {
- return _defaultTestSuite()
- }
-#endif
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmCollectionTypeTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmCollectionTypeTests.swift
index f6bad443f..179a6643a 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmCollectionTypeTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmCollectionTypeTests.swift
@@ -145,7 +145,6 @@ class RealmCollectionTypeTests: TestCase {
super.tearDown()
}
-#if swift(>=4)
override class var defaultTestSuite: XCTestSuite {
// Don't run tests for the base class
if isEqual(RealmCollectionTypeTests.self) {
@@ -153,15 +152,6 @@ class RealmCollectionTypeTests: TestCase {
}
return super.defaultTestSuite
}
-#else
- override class func defaultTestSuite() -> XCTestSuite {
- // Don't run tests for the base class
- if isEqual(RealmCollectionTypeTests.self) {
- return XCTestSuite(name: "empty")
- }
- return super.defaultTestSuite()
- }
-#endif
func testRealm() {
guard let collection = collection else {
@@ -566,7 +556,6 @@ class RealmCollectionTypeTests: TestCase {
// MARK: Results
class ResultsTests: RealmCollectionTypeTests {
-#if swift(>=4)
override class var defaultTestSuite: XCTestSuite {
// Don't run tests for the base class
if isEqual(ResultsTests.self) {
@@ -574,15 +563,6 @@ class ResultsTests: RealmCollectionTypeTests {
}
return super.defaultTestSuite
}
-#else
- override class func defaultTestSuite() -> XCTestSuite {
- // Don't run tests for the base class
- if isEqual(ResultsTests.self) {
- return XCTestSuite(name: "empty")
- }
- return super.defaultTestSuite()
- }
-#endif
func collectionBaseInWriteTransaction() -> Results<CTTNullableStringObjectWithLink> {
fatalError("abstract")
@@ -808,7 +788,6 @@ class ResultsFromLinkViewTests: ResultsTests {
// MARK: List
class ListRealmCollectionTypeTests: RealmCollectionTypeTests {
-#if swift(>=4)
override class var defaultTestSuite: XCTestSuite {
// Don't run tests for the base class
if isEqual(ListRealmCollectionTypeTests.self) {
@@ -816,15 +795,6 @@ class ListRealmCollectionTypeTests: RealmCollectionTypeTests {
}
return super.defaultTestSuite
}
-#else
- override class func defaultTestSuite() -> XCTestSuite {
- // Don't run tests for the base class
- if isEqual(ListRealmCollectionTypeTests.self) {
- return XCTestSuite(name: "empty")
- }
- return super.defaultTestSuite()
- }
-#endif
func collectionBaseInWriteTransaction() -> List<CTTNullableStringObjectWithLink> {
fatalError("abstract")
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmTests.swift
index 79e7675e3..7d93d5f3e 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/RealmTests.swift
@@ -249,6 +249,14 @@ class RealmTests: TestCase {
XCTAssertEqual(try! Realm().objects(SwiftStringObject.self).count, 1)
}
+ func testWriteReturning() {
+ let realm = try! Realm()
+ let object = try! realm.write {
+ return realm.create(SwiftStringObject.self, value: ["1"])
+ }
+ XCTAssertEqual(object.stringCol, "1")
+ }
+
func testCommitWrite() {
try! Realm().beginWrite()
try! Realm().create(SwiftStringObject.self, value: ["1"])
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift
index 151c06d44..33e9f0686 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift
@@ -117,55 +117,55 @@ internal protocol CustomObjectiveCBridgeable {
// FIXME: needed with swift 3.2
// Double isn't though?
extension Float: CustomObjectiveCBridgeable {
- static func bridging(objCValue: Any) -> Float {
+ internal static func bridging(objCValue: Any) -> Float {
return (objCValue as! NSNumber).floatValue
}
- var objCValue: Any {
+ internal var objCValue: Any {
return NSNumber(value: self)
}
}
extension Int8: CustomObjectiveCBridgeable {
- static func bridging(objCValue: Any) -> Int8 {
+ internal static func bridging(objCValue: Any) -> Int8 {
return (objCValue as! NSNumber).int8Value
}
- var objCValue: Any {
+ internal var objCValue: Any {
return NSNumber(value: self)
}
}
extension Int16: CustomObjectiveCBridgeable {
- static func bridging(objCValue: Any) -> Int16 {
+ internal static func bridging(objCValue: Any) -> Int16 {
return (objCValue as! NSNumber).int16Value
}
- var objCValue: Any {
+ internal var objCValue: Any {
return NSNumber(value: self)
}
}
extension Int32: CustomObjectiveCBridgeable {
- static func bridging(objCValue: Any) -> Int32 {
+ internal static func bridging(objCValue: Any) -> Int32 {
return (objCValue as! NSNumber).int32Value
}
- var objCValue: Any {
+ internal var objCValue: Any {
return NSNumber(value: self)
}
}
extension Int64: CustomObjectiveCBridgeable {
- static func bridging(objCValue: Any) -> Int64 {
+ internal static func bridging(objCValue: Any) -> Int64 {
return (objCValue as! NSNumber).int64Value
}
- var objCValue: Any {
+ internal var objCValue: Any {
return NSNumber(value: self)
}
}
extension Optional: CustomObjectiveCBridgeable {
- static func bridging(objCValue: Any) -> Optional {
+ internal static func bridging(objCValue: Any) -> Optional {
if objCValue is NSNull {
return nil
} else {
return .some(dynamicBridgeCast(fromObjectiveC: objCValue))
}
}
- var objCValue: Any {
+ internal var objCValue: Any {
if let value = self {
return dynamicBridgeCast(fromSwift: value)
} else {
diff --git a/Carthage/Checkouts/realm-cocoa/build.sh b/Carthage/Checkouts/realm-cocoa/build.sh
index c3bb27a78..a3ac9f138 100755
--- a/Carthage/Checkouts/realm-cocoa/build.sh
+++ b/Carthage/Checkouts/realm-cocoa/build.sh
@@ -154,7 +154,7 @@ build_combined() {
destination="iPhone 8"
elif [[ "$os" == "watchos" ]]; then
os_name="$os"
- destination="Apple Watch Series 3 - 42mm"
+ destination="Apple Watch Series 4 - 40mm"
elif [[ "$os" == "appletvos" ]]; then
os_name="tvos"
destination="Apple TV"
@@ -175,21 +175,7 @@ build_combined() {
# Combine .swiftmodule
if [ -d $simulator_path/Modules/$module_name.swiftmodule ]; then
- cp $simulator_path/Modules/$module_name.swiftmodule/* $os_path/Modules/$module_name.swiftmodule/
- fi
-
- # Xcode 10.2 merges the generated headers together with ifdef guards for
- # each of the target platforms. This doesn't handle merging
- # device/simulator builds, so we need to take care of that ourselves.
- # Currently all platforms have identical headers, so we just pick one and
- # use that rather than merging, but this may change in the future.
- if [ -f $os_path/Headers/$module_name-Swift.h ]; then
- unique_headers=$(find $build_intermediates_path -name $module_name-Swift.h -exec shasum {} \; | cut -d' ' -f 1 | uniq | grep -c '^')
- if [ $unique_headers != "1" ]; then
- echo "Platform-specific Swift generated headers are not identical. Merging them is required and is not yet implemented."
- exit 1
- fi
- find $build_intermediates_path -name $module_name-Swift.h -exec cp {} $os_path/Headers \; -quit
+ cp -R $simulator_path/Modules/$module_name.swiftmodule/* $os_path/Modules/$module_name.swiftmodule/
fi
# Copy *.bcsymbolmap to .framework for submitting app with bitcode
@@ -202,6 +188,13 @@ build_combined() {
LIPO_OUTPUT="$out_path/$product_name/$module_name"
xcrun lipo -create "$simulator_path/$binary_path" "$os_path/$binary_path" -output "$LIPO_OUTPUT"
+ # The generated headers for Swift libraries have #ifdef checks to only
+ # define symbols for the applicable platforms, so we need to merge them as
+ # well.
+ if [ -f "$out_path/$product_name/Headers/$module_name-Swift.h" ]; then
+ cat "$simulator_path/Headers/$module_name-Swift.h" >> "$out_path/$product_name/Headers/$module_name-Swift.h"
+ fi
+
# Verify that the combined library has bitcode and we didn't accidentally
# remove it somewhere along the line
if [[ "$destination" != "" && "$config" == "Release" ]]; then
@@ -1164,6 +1157,8 @@ case "$COMMAND" in
sed -i '' "s/^VERSION=.*/VERSION=$realm_version/" dependencies.list
sed -i '' "s/^let coreVersionStr =.*/let coreVersionStr = \"$REALM_CORE_VERSION\"/" Package.swift
sed -i '' "s/^let cocoaVersionStr =.*/let cocoaVersionStr = \"$realm_version\"/" Package.swift
+ sed -i '' "s/x.y.z Release notes (yyyy-MM-dd)/$realm_version Release notes ($(date '+%Y-%m-%d'))/" CHANGELOG.md
+
exit 0
;;
@@ -1550,7 +1545,7 @@ x.y.z Release notes (yyyy-MM-dd)
* File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
* Realm Object Server: 3.21.0 or later.
* APIs are backwards compatible with all previous releases in the 4.x.y series.
-* Carthage release for Swift is built with Xcode 11.3.
+* Carthage release for Swift is built with Xcode 11.4.
### Internal
Upgraded realm-core from ? to ?
diff --git a/Carthage/Checkouts/realm-cocoa/dependencies.list b/Carthage/Checkouts/realm-cocoa/dependencies.list
index 087212f13..147a8dc7c 100644
--- a/Carthage/Checkouts/realm-cocoa/dependencies.list
+++ b/Carthage/Checkouts/realm-cocoa/dependencies.list
@@ -1,4 +1,4 @@
-VERSION=4.3.1
+VERSION=4.4.0
REALM_CORE_VERSION=5.23.8
-REALM_SYNC_VERSION=4.9.4
+REALM_SYNC_VERSION=4.9.5
REALM_OBJECT_SERVER_VERSION=3.23.1
diff --git a/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb b/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb
index 32a1ee4b7..e78f7bc7d 100755
--- a/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb
+++ b/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb
@@ -41,7 +41,7 @@ base_examples = [
"examples/tvos/swift",
]
-xcode_versions = %w(10.0 10.1 10.3 11.1 11.2.1 11.3)
+xcode_versions = %w(10.3 11.1 11.2.1 11.3 11.4)
# Remove reference to Realm.xcodeproj from all example workspaces.
base_examples.each do |example|