Andrew Morgan

From Zero to Mobile Developer in 45 Minutes With SwiftUI

What if you could build a native, real-time iOS chat app from scratch in under 45 minutes? This tutorial shows you how.

From Zero to Mobile Developer in 45 Minutes With SwiftUI
#1about 2 minutes

Understanding the core concepts of SwiftUI development

SwiftUI applications are built by composing state-driven views using components like VStack, HStack, and ZStack.

#2about 2 minutes

Using Realm for real-time data synchronization

Realm syncs data between the embedded mobile database and MongoDB Atlas, enabling real-time updates across devices.

#3about 4 minutes

Setting up the Xcode project and dependencies

Start by creating a new SwiftUI app in Xcode and then add the Realm SDK as a dependency using the Swift Package Manager.

#4about 2 minutes

Defining the data model for chat messages

Create a Swift class that inherits from Realm's Object to define the schema for chat messages, including properties and a primary key.

#5about 6 minutes

Implementing anonymous user authentication with Realm

Build a login view that uses Realm's anonymous authentication to log a user in and uses a binding to update the parent view's state.

#6about 3 minutes

Building a navigable list of chat rooms

Use a SwiftUI List and NavigationLink to create a view that displays available chat rooms and navigates to a specific chat view on selection.

#7about 6 minutes

Displaying live messages with ObservedResults

Use the @ObservedResults property wrapper to create a live, auto-updating view of chat messages fetched directly from the local Realm database.

#8about 5 minutes

Sending messages and persisting them to Realm

Implement a function to create a new chat message object and append it to the observed results collection, which automatically persists it to Realm and syncs it.

#9about 1 minute

Verifying real-time sync with MongoDB Atlas

See how creating or modifying a document directly in the MongoDB Atlas cloud UI instantly reflects in the running mobile application.

#10about 2 minutes

Configuring a new backend in MongoDB Cloud

Quickly create and deploy a new serverless backend application for Realm Sync through the MongoDB Cloud UI by defining a partition key.

#11about 8 minutes

Answering audience questions about mobile development

The Q&A session covers topics like Realm's scalability, SwiftUI layout patterns, handling background tasks, and alternatives to Storybook.

Related jobs
Jobs that call for the skills explored in this talk.

job ad

Saby Company
Delebio, Italy

Intermediate

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
CH
Chris Heilmann
WeAreDevelopers LIVE days are changing - get ready to take part
Starting with this week's Web Dev Day edition of WeAreDevelopers LIVE Days, we changed the the way we run these online conferences. The main differences are:Shorter talks (half an hour tops)More interaction in Q&AA tips and tricks "Did you know" sect...
WeAreDevelopers LIVE days are changing - get ready to take part
CH
Chris Heilmann
Dev Digest 134 - Where pixels sing?
News and ArticlesWeAreDevelopers LIVE Data and Security Day is on Wednesday, 25/09/2024. Learn about OPC UA Updates, Best Practices for Using GitHub Secrets, Passwordless Web 1.5, Emerging AI Security Risks, Data Privacy in LLMs and get a chance to t...
Dev Digest 134 - Where pixels sing?
LM
Luis Minvielle
Developers share the most interesting tech they ever built
Most people's first thoughts about Hacker News revolve around venture capital, stock prices, company valuations, and $1499 dongles. But what if we told you that Hacker News could also be a place for pure, consummate, wholesome content that tackles ho...
Developers share the most interesting tech they ever built

From learning to earning

Jobs that call for the skills explored in this talk.

iOS Developer

iOS Developer

moco9221-2
Hamburg, Germany

Remote
55-60K
Intermediate
Java
Angular
TypeScript