apple / apple/sample-cloudkit-coredatasync
Sorting not supporting Localized
- Dominant language
- Swift
- Stars
- 200
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
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](https://useyourloaf.com/blog/configuring-swiftui-fetch-requests/)" and all the amazing news about SwiftUI and Dynamic Configuration in IOS 15.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.