enum ReminderRow { ... } is the declaration of a type, not a type itself. You use the declared type later in variable declarations like let row: ReminderRow = .date. But @unchecked in general goes only in front of Sendable in an inheritance clause.
This error message is not very good in the circumstances. However, what it's trying to tell you is that here you have a declaration of a type (enum ReminderRow...) and you're not allowed to use @unchecked to decorate that.
It's not clear what you're trying to indicate by decorating the type itself as @unchecked--there is no such feature in Swift. We use @unchecked for conformances to Sendable to indicate to the compiler that you know the conforming type is Sendable via internal, manually implemented means that the compiler can't check. You would spell that as follows: enum ReminderRow: @unchecked Sendable.
Actually i was trying to use this ReminderRow as itemIdentifier in the DataSource but according to New swift update itemIdentifier has to be hashable, sendable, even through i make it sendable i tried your solution as well but i was still getting this error “ReminderRow is Main actor-isolated” .
Btw at the end i make ReminderRow nonisolated and remove sendable now it work fine and swift implicitly make the ReminderRow sendable
import UIKit
import Foundation
enum ReminderRow : Hashable{
case date
case notes
case time
case title
var imageName : String? {
switch self {
case .date: return "calendar.circle"
case .notes: return "square.and.pencil"
case .time: return "clock"
default : return nil
}
}
var image : UIImage? {
guard let imageName else { return nil }
let configuration = UIImage.SymbolConfiguration(textStyle: .headline)
return UIImage(systemName: imageName, withConfiguration: configuration)
}
var textStyle : UIFont.TextStyle {
switch self {
case .title : return .headline
default : return .subheadline
}
}
}