Skip to content

Commit 2d07f5c

Browse files
authored
Upgrade to core v14.13.0 (#8689)
1 parent 410927c commit 2d07f5c

File tree

12 files changed

+110
-118
lines changed

12 files changed

+110
-118
lines changed

.github/workflows/build-pr.yml

Lines changed: 93 additions & 93 deletions
Large diffs are not rendered by default.

.github/workflows/master-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- "master"
77
- "release/**"
88
env:
9-
XCODE_VERSION: "['15.3', '15.4', '16_Release_Candidate', '16.1_beta']"
9+
XCODE_VERSION: "['15.3', '15.4', '16', '16.1_beta_2']"
1010
PLATFORM: "['ios', 'osx', 'watchos', 'tvos', 'catalyst', 'visionos']"
1111
DOC_VERSION: '15.4'
1212
RELEASE_VERSION: '15.4'

CHANGELOG.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ The minimum supported version of Xcode is now 15.3.
2727
using Xcode 16 in Swift 5 mode due to the removal of implicit isolation when
2828
using property wrappers on member variables. This resulted in some new
2929
sendability warnings in Xcode 16 (or errors in Swift 6 mode).
30-
* Add Xcode 16 and 16.1 binaries to the release packages (currently built with
31-
beta 6 and beta 1 respectively).
30+
* Add Xcode 16 and 16.1 binaries to the release packages.
3231

3332
### Fixed
34-
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?)
35-
* None.
36-
37-
<!-- ### Breaking Changes - ONLY INCLUDE FOR NEW MAJOR version -->
33+
* Having a query with a number of predicates ORed together may result in a
34+
crash on some platforms (strict weak ordering check failing on iphone)
35+
([#8028](https://github.com/realm/realm-core/issues/8028), since v10.50.0)
3836

3937
### Compatibility
4038
* Realm Studio: 15.0.0 or later.
@@ -44,7 +42,7 @@ The minimum supported version of Xcode is now 15.3.
4442
* Xcode: 15.3.0-16.1 beta.
4543

4644
### Internal
47-
* Upgraded realm-core from ? to ?
45+
* Upgraded realm-core from v14.12.1 to 14.13.0
4846

4947
10.53.1 Release notes (2024-09-05)
5048
=============================================================

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import PackageDescription
44
import Foundation
55

6-
let coreVersion = Version("14.12.1")
6+
let coreVersion = Version("14.13.0")
77
let cocoaVersion = Version("10.53.1")
88

99
#if compiler(>=6)

Realm/ObjectServerTests/RealmServer.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ extension URLSession {
3838
completionHandler(.success(data))
3939
} else if let error = error {
4040
completionHandler(.failure(error))
41-
// swiftlint:disable:next non_optional_string_data_conversion
4241
} else if let data = data, let string = String(data: data, encoding: .utf8) {
4342
completionHandler(.failure(NSError(domain: URLError.errorDomain,
4443
code: URLError.badServerResponse.rawValue,
@@ -657,7 +656,6 @@ final public class RealmServer: NSObject, Sendable {
657656
let pipe = Pipe()
658657
pipe.fileHandleForReading.readabilityHandler = { file in
659658
guard file.availableData.count > 0,
660-
// swiftlint:disable:next non_optional_string_data_conversion
661659
let available = String(data: file.availableData, encoding: .utf8)?.split(separator: "\t") else {
662660
return
663661
}
@@ -678,9 +676,9 @@ final public class RealmServer: NSObject, Sendable {
678676
} else if part.contains("ERROR") {
679677
parts.append("🔴")
680678
} else if let json = try? JSONSerialization.jsonObject(with: part.data(using: .utf8)!) {
681-
parts.append(String(decoding: try! JSONSerialization.data(withJSONObject: json,
682-
options: .prettyPrinted),
683-
as: UTF8.self))
679+
try! parts.append(String(data: JSONSerialization.data(withJSONObject: json,
680+
options: .prettyPrinted),
681+
encoding: .utf8)!)
684682
} else if !part.isEmpty {
685683
parts.append(String(part))
686684
}

RealmSwift/Impl/SchemaDiscovery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private func getLegacyProperties(_ object: ObjectBase, _ cls: ObjectBase.Type) -
156156
if class_getProperty(cls, label) != nil {
157157
throwRealmException("Property \(cls).\(label) is declared as \(type(of: prop.value)), which is not a supported managed Object property type. If it is not supposed to be a managed property, either add it to `ignoredProperties()` or do not declare it as `@objc dynamic`. See https://www.mongodb.com/docs/realm-sdks/swift/latest/Classes/Object.html for more information.")
158158
}
159-
if prop.value as? RealmOptionalProtocol != nil {
159+
if prop.value is RealmOptionalProtocol {
160160
throwRealmException("Property \(cls).\(label) has unsupported RealmOptional type \(type(of: prop.value)). Extending RealmOptionalType with custom types is not currently supported. ")
161161
}
162162
return nil

RealmSwift/ObjectId.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public final class ObjectId: RLMObjectId, Decodable, @unchecked Sendable {
7070
///
7171
/// Aborts if the string is not 24 characters or contains any characters other than 0-9a-fA-F. Use the initializer which takes a String to handle invalid strings at runtime.
7272
public required init(_ str: StaticString) {
73+
// swiftlint:disable:next optional_data_string_conversion
7374
try! super.init(string: str.withUTF8Buffer { String(decoding: $0, as: UTF8.self) })
7475
}
7576

RealmSwift/Realm.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ extension Realm {
14041404
@discardableResult
14051405
@_unsafeInheritExecutor
14061406
public func asyncRefresh() async -> Bool {
1407-
guard rlmRealm.actor as? Actor != nil else {
1407+
guard rlmRealm.actor is Actor else {
14081408
fatalError("asyncRefresh() can only be called on main thread or actor-isolated Realms")
14091409
}
14101410
guard let task = RLMRealmRefreshAsync(rlmRealm) else {

RealmSwift/Tests/CodableTests.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ class CodableTests: TestCase, @unchecked Sendable {
305305
func encode<T: RealmOptionalType & Codable & _RealmSchemaDiscoverable>(_ value: T?) -> String {
306306
let opt = RealmOptional<T>()
307307
opt.value = value
308-
return try! String(decoding: encoder.encode([opt]), as: UTF8.self)
308+
return try! String(data: encoder.encode([opt]), encoding: .utf8)!
309309
}
310310
func encode<T: Codable>(_ value: T?) -> String {
311-
return try! String(decoding: encoder.encode([value]), as: UTF8.self)
311+
return try! String(data: encoder.encode([value]), encoding: .utf8)!
312312
}
313313

314314
func legacyObjectString(_ nullRealmProperty: Bool = false) -> String {
@@ -1535,7 +1535,6 @@ class CodableTests: TestCase, @unchecked Sendable {
15351535
// Verify that it encodes to exactly the original string (which requires
15361536
// that the original string be formatted how JSONEncoder formats things)
15371537
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
1538-
// swiftlint:disable:next non_optional_string_data_conversion
15391538
let actual = try XCTUnwrap(String(data: encoder.encode(obj), encoding: .utf8))
15401539
XCTAssertEqual(str, actual)
15411540

@@ -2221,7 +2220,6 @@ class CodableTests: TestCase, @unchecked Sendable {
22212220
// Verify that it encodes to exactly the original string (which requires
22222221
// that the original string be formatted how JSONEncoder formats things)
22232222
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
2224-
// swiftlint:disable:next non_optional_string_data_conversion
22252223
let actual = try String(data: encoder.encode(obj), encoding: .utf8)
22262224
XCTAssertEqual(str, actual)
22272225
}
@@ -2431,7 +2429,6 @@ class CodableTests: TestCase, @unchecked Sendable {
24312429
obj.objectId = ObjectId("1234567890abcdef12345678")
24322430
obj.uuid = UUID(uuidString: "00000000-0000-0000-0000-000000000000")!
24332431
obj.date = Date(timeIntervalSince1970: 0)
2434-
// swiftlint:disable:next non_optional_string_data_conversion
24352432
let actual = try XCTUnwrap(String(data: encoder.encode(obj), encoding: .utf8))
24362433
// Before the 2024 OS versions, int8 was sorted before int16
24372434
let expected = if #available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, *) {

RealmSwift/Tests/TestUtils.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ public func assertPreconditionFailure<T>(_ message: String, _ expression: () asy
272272
guard let data = try pipe.fileHandleForReading.readToEnd() else {
273273
return XCTFail("Expected child process to crash with message \"\(message)\", but it exited without printing anything", file: file, line: line)
274274
}
275-
// swiftlint:disable:next non_optional_string_data_conversion
276275
guard let str = String(data: data, encoding: .utf8) else {
277276
return XCTFail("Expected child process to crash with message \"\(message)\", but it did not print valid utf-8", file: file, line: line)
278277
}
@@ -349,7 +348,6 @@ public func assertPreconditionFailure<T: Sendable>(
349348
guard let data = try pipe.fileHandleForReading.readToEnd() else {
350349
return XCTFail("Expected child process to crash with message \"\(message)\", but it exited without printing anything", file: file, line: line)
351350
}
352-
// swiftlint:disable:next non_optional_string_data_conversion
353351
guard let str = String(data: data, encoding: .utf8) else {
354352
return XCTFail("Expected child process to crash with message \"\(message)\", but it did not print valid utf-8", file: file, line: line)
355353
}

0 commit comments

Comments
 (0)