3 ms·
As far as I'm aware only visionOS has some Swift-only frameworks. All the actually important frameworks for macOS and iOS development are still callable from Ob
by flohofwoe 3y ago
As far as I'm aware only visionOS has some Swift-only frameworks. All the actually important frameworks for macOS and iOS development are still callable from ObjC.
- akmarinov 3y agoThere’s a whole bunch of frameworks that are Swift only like SwiftUI, WidgetKit, SwiftData, MusicKit, SharePlay, DeviceActivity and others and can’t be called from ObjC
- meepmorp 3y agoBut you can write Swift code that can be called from objc, right? Could you write a wrapper/shim in Swift for "object c" that you'd then call using the method outlined in the article?
- akmarinov 3y agoYou can yeah. With Apple’s older frameworks, you could use either though. It just shows that they’re gradually moving away from ObjC
- andrekandre 3y ago> Swift code that can be called from objc, right? Could you write a wrapper/shim in Swift for "object c" you could, but there are some things that are harder to represent such as structs and complex enums (since everything "objective" in obj-c is a reference), or even async/await based api's (perhaps with lots of black-based wrappers?)