Seamus  Quitzon

Seamus Quitzon

1596763140

Building a Multi-platform App with SwiftUI

At WWDC 2020, Apple introduced a bunch of great new updates to SwiftUIto make it even easier for developers to write apps for Apple platforms. In this tutorial, you’ll learn how to use those new features to make your app work on both iOS and macOS. By the end of this tutorial you will have created a fully functional HackerNews reader.

You can download the source code on my GitHub.

This tutorial requires Xcode 12, macOS 11.0 Big Sur, and iOS 14. See this guide on how to install the betas on a separate partition.

Image for post

Setting up a new Xcode project

Open Xcode 12 or newer and hit ⌘⇧N to create a new project. Navigate to the new “Multiplatform” section, select App and press Next. Then save your project as usual.

Image for post

The new multiplatform section in Xcode 12

Starter files

You can download the starter files for this project from GitHub. These files define interfaces to work with the HackerNews API and lay the groundwork for the MVVM design pattern, which you will use throughout the app. The next section explains the API and MVVM in more detail.

From the file navigator, create groups named Models and ViewModels in the Shared section. This section contains all code used by both the iOS and macOS apps. Drag the starter files from Finder into the correct group in Xcode. Don’t forget to check “Copy items if needed” and select both platform targets. You can place HackerNews.swift directly in the Sharedsection. After you’re done, your file navigator should look as follows:

Image for post

Allowing network connections on macOS

On macOS, you need to explicitly allow network usage. Select the project file, navigate to the macOS target, select the Signing & Capabilities tab, then check Outgoing Connections (Client).

Image for post

#macos #swiftui #heartbeat #ios #ios-app-development

What is GEEK

Buddha Community

Building a Multi-platform App with SwiftUI

Cross Platform Mobile App Development Company in USA

AppClues Infotech is a top-notch cross platform mobile app development company in USA. With strong mobile app designers & developers team that help to create powerful cross-platform apps using the current market technologies & functionalities.

For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910

#cross platform mobile app development company #best cross platform mobile app development #cross platform app development services #top cross platform app development company #cross-platform app development usa #hire cross-platform app developer

Hire Cross-Platform App Developers

AppClues Infotech offers high-quality cross-platform mobile app development services. Our expert & highly skilled developers build innovative, robust, scalable & interactive mobile apps for your business needs with the most advanced tools & features.

For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910

#cross platform mobile app development company #best cross platform mobile app development #cross platform app development services #top cross platform app development company #hire cross-platform app developers #hire top cross-platform app developers usa

Best Cross-Platform App Development Services Company in USA

Are you finding the best Cross-Platform App Development Service providing company in USA? We at AppClues Infotech is one of the leading mobile app development company in USA that helps to make a creative & high-quality Cross-Platform mobile app with modern methodology & technology.

Hire our dedicated team of designers & programmers for your app development project.

Cross-Platform App Development Services
• Custom Cross-Platform App Development
• Porting Cross-Platform Apps
• Cross-Platform App Migration
• Cross-Platform UI/UX Designing

For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910

#best cross-platform app development services company in usa #cross platform mobile app development company #best cross platform mobile app development #cross platform app development services #top cross platform app development company #cross-platform app development

Hire Top Cross-Platform Mobile App Developers in USA

Looking for dedicated & highly skilled Cross-Platform mobile app developers for your app development project? We at AppClues Infotech have the best team of Cross-Platform mobile app developers that help to designing & developing powerful cross-platform apps with the latest trends & features.

For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910

#cross platform mobile app development company #cross platform mobile app development company #cross platform mobile app development company #top cross platform app development company #top cross platform app development company #top cross platform app development company

Hire Dedicated Cross-Platform App Developers in USA & India

Are you looking to Hire Dedicated Cross-Platform App Developers in USA & India? AppClues Infotech is a professional & experienced cross-platform mobile app development services provider company in USA & India. Hire our dedicated & talented mobile app designer & developers to get the best-in-class cross-platform mobile app development services.

For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910

#cross platform mobile app development company #best cross platform mobile app development #cross platform app development services #top cross platform app development company #best cross-platform app developers in usa & india #hire dedicated cross-platform app developers in usa & india