sample-cloudkit-coredatasync
sample-cloudkit-coredatasync copied to clipboard
Sorting not supporting Localized
Hi, I am from Europe, Sweden. I have struggled with the FetchRequest and sorting, because the project not support localized sort order. After som research I found a solution that I wan´t to share with you.
@FetchRequest(
sortDescriptors: [NSSortDescriptor(key: "name", ascending: true, selector: #selector(NSString.localizedStandardCompare(_:)))],
animation: .default)
I would like to thanks Keith Harrison for his article "Configuring SwiftUI Fetch Requests" and all the amazing news about SwiftUI and Dynamic Configuration in IOS 15.