realm-swift icon indicating copy to clipboard operation
realm-swift copied to clipboard

ObservedResults sortDescriptor isn't a sequence

Open PhilippeWeidmann opened this issue 3 years ago • 3 comments

How frequently does the bug occur?

All the time

Description

@ObservedResults initializer documentation states that the sortDescriptor argument is a sequence. However it only takes one SortDecriptor object as an argument.

I don't know if the documentation is wrong or if the feature is missing. Either case it would be great if it could take an array of sortDescriptor to do a sorted(by: []) with multiple descriptors.

I don't know if it's a bug in the documentation or a missing feature.

Stacktrace & log output

No response

Can you reproduce the bug?

Yes, always

Reproduction Steps

Go to the @ObservedResults initializer documentation. It states: - parameter **sortDescriptor**: A sequence of SortDescriptors to sort by

Version

10.24.1

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

iOS 15.4

Build environment

Xcode version: 13.3 Dependency manager and version: SPM

PhilippeWeidmann avatar Mar 21 '22 09:03 PhilippeWeidmann