Catalyst and Native using SwiftUI to develop a new app for the macOS?

We believe it's time to start developing apps using SwiftUI by watched the WWDC20 "Keynote" and "Platforms State of the Union".

We are planning to develop an app for the iOS and macOS, and we'd like to macOS app to be fine tuned to use the macOS native capabilities. I am wondering what's the recommend way that @Apple prefer to do for the new app using SwiftUI for developing the macOS app, catalyst or native? (sharing code is not the key, we can copy :) )

Thank you.

Accepted Reply

There are a lot of possible paths for creating a multi platform app — which path you choose will depend on your team and the app you’re hoping to create.

If you’re primarily using SwiftUI, you can try using the new multi platform app project template in Xcode 12. This template configures a group for shared code that you can use for data, app structure, and common interface elements. Then you can use the platform-specific groups for iOS or macOS to flesh out platform-specific assets and views to your liking. As an example, the Fruta sample code project uses this technique to create an app that looks great on iPhone, iPad, and Mac.
https://developer.apple.com/documentation/swiftui/fruta_building_a_feature-rich_app_with_swiftui

If you go down the Mac Catalyst route — which is great (and native) — you will need to put effort in when choosing to adopt the Mac Idiom, if you prefer your app better fitting the Mac system experience.
https://developer.apple.com/documentation/uikit/mac_catalyst/choosing_a_user_interface_idiom_for_your_mac_app

In either case, you may want to focus on a single platform while initially iterating on your interface to make sure you have a great experience and story — then adapt it to fit the next platform, utilizing its strengths.

Replies

Apple is really pushing for the development experience for macOS and iOS/iPadOS to be merged and made more seamless (hence the introduction of Catalyst. Plus, the transition to ARM chips will merge the development experience even more).

Catalyst is a powerful technology that is able to meet a lot of requirements, and is a great choice considering the trend for cross-platform development that Apple is pushing for.

However, there are still things missing. For example, HomeKit and ClassKit are being added in macOS Big Sur (Mac Catalyst 14). If you were looking to target older versions of Mac and still be able to use these technologies, then Catalyst is not the way to go. I would recommend looking here to ensure the technologies you want to use are compatible with the version you are targeting. Most of them are available since Mac Catalyst 13, but there are a few exceptions (such as HomeKit).

That being said, if all of your technologies are available (or you are targeting Mac Catalyst 14+), then I don't think you can go wrong with using Catalyst. It is a very powerful tool, and is definitely the trend of development that Apple is currently pushing for.
There are a lot of possible paths for creating a multi platform app — which path you choose will depend on your team and the app you’re hoping to create.

If you’re primarily using SwiftUI, you can try using the new multi platform app project template in Xcode 12. This template configures a group for shared code that you can use for data, app structure, and common interface elements. Then you can use the platform-specific groups for iOS or macOS to flesh out platform-specific assets and views to your liking. As an example, the Fruta sample code project uses this technique to create an app that looks great on iPhone, iPad, and Mac.
https://developer.apple.com/documentation/swiftui/fruta_building_a_feature-rich_app_with_swiftui

If you go down the Mac Catalyst route — which is great (and native) — you will need to put effort in when choosing to adopt the Mac Idiom, if you prefer your app better fitting the Mac system experience.
https://developer.apple.com/documentation/uikit/mac_catalyst/choosing_a_user_interface_idiom_for_your_mac_app

In either case, you may want to focus on a single platform while initially iterating on your interface to make sure you have a great experience and story — then adapt it to fit the next platform, utilizing its strengths.
Thanks @JakeShort

Yes, we also think that Apple MAY combine the iOS and macOS (and the app stores) into one at future, and encourage to combine the the iOS, iPadOS and macOS apps together.

Right now, we prefer to developer macOS app NOT using the Catalyst as we want to the app be a real Mac app to use platform-specific capabilities. But with the news about Apple silicon, we have no more idea about Apple's direction - combine all into one or still keeping them be separated. If Apple's direction is to combine them together, we will choose Catalyst.