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.
- Which Swift declarations are exposed to Objective-C without writing @objc, and how do you check?
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… - How does Swift 6 treat Objective-C types for Sendable and actor isolation, and what annotations help?
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
- 4.1 · Message send, selectors, forwarding, isa
- 4.2 · Categories, associated objects, load and initialize
- 4.3 · NSObject, class clusters, copying
- 4.4 · @objc, what does not bridge, and error bridging
- 4.5 · Nullability, lightweight generics, Swift-friendly names
- 4.6 · Method swizzling, and when it is a footgun
- 4.7 · Reading Objective-C, blocks, and manual reference counting
- 4.8 · Mixed-language projects, costs, and migrating a large app
- 4.9 · How Objective-C declarations arrive in Swift
- 4.10 · The runtime up close: introspection, encodings, IMPs and exceptions
- 4.11 · Key-value coding and observing