
Learn to build real-time iOS apps by connecting Apple devices to an ASP.NET Core SignalR server using the Swift SignalR client, handling connections, errors, HTTP methods, and lifecycle events.
Set up a real-time server for the iOS app with dotnet. Clone the repo, restore packages, run the server, and verify the chat hub broadcasts to all connected clients.
Create a new Xcode project named SignalR chat app with SwiftUI, then add the Swift SignalR client via Swift Package Manager, noting CocoaPods as an alternative and opening the workspace.
Build a real-time iOS chat UI with the Swift SignalR client. Define a message struct, store and display messages, and implement a name popup at start and a send flow.
Improve real-time messaging reliability by handling send errors with callbacks and user popups, and manage hub connection life cycle through an HTTP connection delegate handling open, failure, and close events.
enable automatic reconnection in a real-time iOS app by wiring hub connection life cycle events, showing a reconnection popup, and configuring a reconnect policy on the hub connection builder.
Learn to handle structural types in SignalR by passing a single message object with name and text, and using decodable, encodable, or codable for JSON exchange.
Switch from fire-and-forget send to invoke, which confirms completion and may return a value, and explore streaming with cancellation via the Cancel Stream Invocation API.
Do you need to write an iPhone application that sends and receives instant updates to and from your ASP .NET Core backend? Would you like your Apple Watch to communicate with other devices and web sites in real time using SignalR? If so, look no further – this course is precisely what you need.
About the course
This course will teach you how to build applications for devices in Apple’s ecosystem running iOS, watchOS, tvOS or macOS that use SignalR for real-time communication via the ASP .NET Core backend.
In this course, you will gain hands-on experience by building an iPhone chat application from scratch that leverages the Swift SignalR Client to exchange messages with other users using an ASP .NET Core based chat server.
What you will learn
Key topics covered in this course include:
SignalR communication implementation
Error handling and hub connection life cycle
Automatic reconnection
Structural type handling
Troubleshooting issues
The most common mistakes and ways to avoid them
By the end of this course, you will have a deep understanding of how to integrate the Swift SignalR Client with your application, understand the nuances of working with the ASP .NET Core SignalR Server and know how to effectively identify, troubleshoot, and resolve issues encountered when communicating with the backend server.
About the instructor
My name is Pawel, and I am the creator of the SignalR Swift Client – the most widely used ASP .NET Core SignalR client for Apple’s ecosystem and a former member of the SignalR team at Microsoft.