3 ms·
There’s a whole bunch of frameworks that are Swift only like SwiftUI, WidgetKit, SwiftData, MusicKit, SharePlay, DeviceActivity and others and can’t be called f
by akmarinov 3y ago
There’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?)