Calling certain code in a MainActor class or function crashes when building with Swift 6.The crash occurs due to dynamic actor isolation enforcement from non-strict-concurrency contexts.The issue arises when using Objective-C code in Swift, as the Swift compiler and runtime cannot prove its safety.Swift 6 mode proactively crashes the app to prevent data races and encourages transitioning by carefully annotating the code.