Исправление предупреждений о несоответствии «Sendable» для ImageResource в Swift 5.10. ⇐ IOS
Исправление предупреждений о несоответствии «Sendable» для ImageResource в Swift 5.10.
I have a file with some constants that maps enums to associated ImageResource for simplified usage in other places. Sample is below
static let imagePreviews: [MyEnum: ImageResource] = [ .Enum1: .imageResource1, .Enum1: .imageResource2, ... ] After upgrading to latest XCode that uses Swift 5.10 following warning is shown around code block above and judging by other similar warnings, common pattern is usage of ImageResource
Static property 'activityBlockImagePreviews' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6
Источник: https://stackoverflow.com/questions/781 ... swift-5-10
I have a file with some constants that maps enums to associated ImageResource for simplified usage in other places. Sample is below
static let imagePreviews: [MyEnum: ImageResource] = [ .Enum1: .imageResource1, .Enum1: .imageResource2, ... ] After upgrading to latest XCode that uses Swift 5.10 following warning is shown around code block above and judging by other similar warnings, common pattern is usage of ImageResource
Static property 'activityBlockImagePreviews' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6
Источник: https://stackoverflow.com/questions/781 ... swift-5-10
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
SwiftUI: реализация Redo с помощью UndoManager без предупреждений о закрытии Sendable
Anonymous » » в форуме IOS - 0 Ответы
- 11 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Почему Python 3.12.6 не повышает valueError при несоответствии с разрезом задания?
Anonymous » » в форуме Python - 0 Ответы
- 3 Просмотры
-
Последнее сообщение Anonymous
-