CoreML Intro — Image Classification

Core ML is Apple’s machine learning framework designed to integrate machine learning models into iOS, macOS, watchOS, and tvOS apps. It allows developers to run machine learning models directly on-device, enabling real-time predictions with minimal latency and without requiring a network connection. Core ML is optimized for performance and power efficiency, making it ideal for … Read more

Async Await in Swift & SwiftUI

Async await is part of Swift concurrency. If you are new to concurrency, you should read this article first: Concurrency In Swift. async/await allows us to write asynchronous code in Swift. It enables us to define asynchronous functions and manage concurrency in a way that looks like synchronous code. So code becomes more readable and … Read more

Complete iOS E-Commerce App in SwiftUI with Stripe & Apple Pay Integration

In this article, I will cover how to develop a complete e-commerce shopping app in SwiftUI with Payment Gateway integration using Stripe. We will also implement Apple Pay so that user can make payments easily using their Apple Wallet. Note: Apple Pay is just a wallet like a virtual card holder. We still need to … Read more

ObservableObject in SwiftUI

ObservableObject is a protocol in SwiftUI that enables a class to be observed for changes. When an object conforms to ObservableObject, it can broadcast changes to its properties so that SwiftUI views can update themselves automatically when these properties change. Key Features of ObservableObject: How to Use ObservableObject: Define a Class Conforming to ObservableObject: Create … Read more

Difference between StateObject and EnvironmentObject

Both @StateObject and @EnvironmentObject are property wrappers in SwiftUI used to manage and observe ObservableObject instances. They serve different purposes and are used in various scenarios. @StateObject Purpose: When to Use: How to Use StateObject: When we need to use a StateObject in another view, we had to pass it. But if we use EnvironmentObject, … Read more

HashMap in Swift

A hash map is a data structure that stores key-value pairs. It uses a hash function to compute an index into an array of buckets, where the key-value pair is stored. Key Characteristics of Hash Maps Operations in a Hash Map HasMap in Swift In Swift, a dictionary is a built-in data structure that serves … Read more

Graph Data Structure in Swift

A graph data structure is a collection of nodes (or vertices) and edges that connect pairs of nodes. Graphs are used to represent various types of network structures, such as social networks, maps, communication networks, and transportation systems. Here’s a brief overview: Components of a Graph Types of Graphs Undirected Graph: Directed Graph (Digraph): Weighted … Read more