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.
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.
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.
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.