We have now customized framework at the moment in Swift 5. This framework has been developed on 2018 and we periodically supporting the Swift adjustments and at the moment in Swift 5. We have now Codable courses, Structs, UIViewControllers, UITabelViewCells, Frequent BaseRequest courses, Singleton courses, we’ve callback strategies, protocol strategies and and so on.
Now, planning emigrate to Swift 6 to choose the concurrency as effectively.
Initially I’ve enabled the blow settings within the venture settings,
- Strict Concurrency Checking – Minimal to Full
- Swift Language model – 5 to six
Virtually, each information within the venture began displaying the compiler error (150 + errors). Given few errors beneath,
- DeviceDetailsLogger.swift:14:16 Static property ‘shared’ will not be concurrency-safe as a result of non-‘Sendable’ kind ‘DeviceDetailsLogger’ might have shared mutable state
- Logger.swift:18:16 Static property ‘shared’ will not be concurrency-safe as a result of non-‘Sendable’ kind ‘Logger’ might have shared mutable state
- SdkEvents.swift:32:23 Static property ‘shared’ will not be concurrency-safe as a result of it’s nonisolated world shared mutable state.
- SdkEvents.swift:39:17 Primary actor-isolated default worth in a nonisolated context
- BaseRequest.swift:34:7 Non-final class ‘BaseRequest’ can’t conform to ‘Sendable’; use ‘@unchecked Sendable’
- BaseRequest.swift:38:18 Saved property ‘requestId’ of ‘Sendable’-conforming class ‘BaseRequest’ is mutable
- BaseRequest.swift:191:21 Seize of ‘completionBlock’ with non-sendable kind ‘FDRequestableResponseBlock’ (aka ‘(Elective
>, Bool) -> ()’) in a @Sendable
closure - AuthLangTnCRequest.swift:11:7 Non-final class ‘AuthLangTnCRequest’ can’t conform to ‘Sendable’; use ‘@unchecked Sendable’
- AuthLangTnCRequest.swift:13:9 Saved property ‘dataDictionary’ of ‘Sendable’-conforming class ‘AuthLangTnCRequest’ is mutable
- Cryptor.swift:13:24 Static property ‘privateShared’ will not be
concurrency-safe as a result of it’s nonisolated world shared mutable state - ConfigurationRequest.swift:11:7 Non-final class ‘ConfigurationRequest’ can’t conform to ‘Sendable’; use ‘@unchecked Sendable’
- AlertViewUtility.swift:31:23 Static property ‘shared’ will not be concurrency-safe as a result of non-‘Sendable’ kind ‘AlertViewUtility’ might have shared mutable state
- EnrollmentViewController.swift:338:10 Primary actor-isolated occasion methodology ‘handleADManualEnrolmentUseCase(dataDictionary:fiInfoResponse:sdkFlow:)’ can’t be used to fulfill nonisolated protocol requirement
Above few courses are singleton courses.
What are the steps I’ve to observe emigrate to six?
Ought to I think about to vary the courses to actor to ensure the thread security?
It will be very useful for those who share your expertise or steering on this. Thanks prematurely.
Am studying the Apple documentation and different blogs relating to the Concurrencies in parallel.