When making a Multiplatform app with SwiftUI (supporting both iOS and macOS), is there a particular reason to use multiple targets over Catalyst (or vice versa)?
From what I understand, one big difference is that if you need an "escape hatch" to do something SwiftUI doesn't support, you will only be able to do UIKit if you follow the Catalyst approach. This makes me think Catalyst would be a better fit for an iOS developer like me.
In addition, you can access AppKit from Catalyst, which seems to make that approach more flexible (If I need to do something only available in AppKit).
On the other hand, creating a new cross-platform project in Xcode creates two targets which makes me wonder if that's the officially recommended approach. Maybe because this would allow more flexibility if you want different build settings for each platform?
Another, related question: If I use Catalyst for 1.0 of an app, and release an app to the App Store, can I switch to the multiple-target approach later?
From what I understand, one big difference is that if you need an "escape hatch" to do something SwiftUI doesn't support, you will only be able to do UIKit if you follow the Catalyst approach. This makes me think Catalyst would be a better fit for an iOS developer like me.
In addition, you can access AppKit from Catalyst, which seems to make that approach more flexible (If I need to do something only available in AppKit).
On the other hand, creating a new cross-platform project in Xcode creates two targets which makes me wonder if that's the officially recommended approach. Maybe because this would allow more flexibility if you want different build settings for each platform?
Another, related question: If I use Catalyst for 1.0 of an app, and release an app to the App Store, can I switch to the multiple-target approach later?