4.12 · What crosses the boundary: inference and concurrency

Two decisions shape how clean a mixed codebase is: which Swift declarations Objective-C can see, and what Swift’s concurrency checker believes about Objective-C types.

Mental model. The border has two customs offices: one decides what Objective-C may see of Swift, the other what Swift may assume about Objective-C.

Both directions

The rules for exposure, and how Swift 6 treats Objective-C types.

  1. Which Swift declarations are exposed to Objective-C without writing @objc, and how do you check? 4.12.1 · L3
    Swift 4 removed most implicit exposure; today a member is exposed to Objective-C only when something explicitly requires it. Rules that apply: a member of an…
  2. How does Swift 6 treat Objective-C types for Sendable and actor isolation, and what annotations help? 4.12.2 · L5
    Swift’s concurrency checker cannot read an Objective-C implementation, so it works from the header. An ordinary Objective-C class is not Sendable, and…

More in Objective-C & interop