Blog

All the blog posts on this website.

Highlights of SwiftUI Release 3

This year, Apple focused on supporting deeper adoption of the framework for our apps.

Exploring Swift: Enumerated Parallel Tasks withThrowingTaskGroup

This post explores working with parallel tasks with enumerations while maintaining their positions.

Exploring MusicKit: Transient Item

Understanding the meaning of the transient item, errors related to it and using it correctly

Exploring SpriteKit: SwiftUI and SKScene

An introduction to working with SpriteKit, beginning with SpriteView of SwiftUI and SKScene

Exploring MusicKit: Editing Playlists

Creating a custom `LibraryPlaylist` structure to edit user's playlists

Exploring HealthKit: Activity Summary

Fetching the data from activity summary like calories burned, and exercise minutes with async/await alternative

Exploring SwiftUI: New Sheet Modifiers in Xcode 14.3 Beta

Explore the new, exciting sheet modifiers that the SwiftUI team released for us.

Exploring CI/CD: Automating DocC

Provide explicit spacing to inner views inside your VStack and HStack by creating zero spacing stacks.

Exploring Xcode: Adding Custom Fonts with Code Snippets

A step-by-step approach to adding custom fonts easily to your app

Exploring MusicKit: Song Structure with Code Snippets

Understanding the fundamental music item that is present in almost every other music item.

Exploring SwiftUI: HStack and VStack Zero Spacing

Provide explicit spacing to inner views inside your VStack and HStack by creating zero spacing stacks.

Exploring SwiftUI: Typography System

Defining all the fonts in one place for consistency and easily modifying them in the future

Exploring SwiftUI: Splash Screen

A simple screen onboarding is important for your users to understand what your app is about, and what unique feature values their time.

Exploring SwiftUI: Orientation Property Wrapper

Creating a custom property wrapper for managing orientation for single window on iPad

Exploring SwiftUI: Large Title in Navigation Bar Conditionally

Looking at a peculiar case of showing the large title in the navigation bar conditionally

Exploring SwiftUI: Grid Layout

You might be aware of the fact that SwiftUI only supports a List, but nothing like a `collectionView` natively. I have been learning about Combine and thought of trying to implement something similar.

Exploring SwiftUI: DynamicTypeSize

Make your text and views accessible for different font sizes

Exploring SwiftUI: Dynamic TabView

Creating dynamic TabItem in SwiftUI

Exploring SwiftUI: DragGesture for fullScreenCover

Adding a swipe down to dismiss on a full screen cover

Exploring SwiftUI: Custom Modal for iPad

If you're not satisfied with the modal on iPad, time to create a custom one!

Exploring SwiftUI: Custom Colors and Modifiers

I switched to custom colors for the branding, which is inspired by the systemIndigo color from UIColor.

Exploring SwiftUI: Color System

Create a color system in SwiftUI to define all the colors in one place and easily modify them in the future.

Exploring SwiftUI: baselineOffset Modifier

Adjust the text or image vertically according to the needs

Exploring MusicKit: Search Library Resources

Searching the library resources using Apple Music API and MusicKit

Exploring MusicKit: Repeat Mode

Implementing the RepeatMode button in your Apple Music client app

Exploring MusicKit: Playback Status

Observing the playback status in your Apple Music client app

Exploring MusicKit: PlayParameters

Using PlayParameters and MPMusicPlayerPlayParameters

Exploring MusicKit: Introduction

MusicKit for Swift makes it easy to add Apple Music in our app.

Exploring MusicKit: Gradient Background

An attempt to add an animated gradient background similar to Apple Music

Exploring MusicKit: Genres

Get the genres of the current top charts or fetch it by its identifier

Exploring MusicKit: Audio Variants

Exploring the audio variants and how to show them in the app using MusicKit

Exploring MusicKit: ArtworkImage

A view that displays an image for an instance of Artwork.

Exploring MusicKit: Artist Artwork

Get the artist artwork from iTunes website using Open Graph meta tags

Exploring Apple Music API: Postman

Use Postman to experiment and explore Apple Music APIs by generating the developer and user token for the headers.

Exploring Accessibility: Widgets

Apple announced widgets for iOS 14 that you can have on your home screen alongside your existing apps. Widgets help you to personalize the screen with glanceable relevant data upfront.

Exploring Accessibility: Voice Control

Applying a motion effect to the button when it is in focus

Exploring Accessibility: SF Symbol

SwiftUI doesn’t provide any initializer for `Image` to have the label as a parameter or something to ignore for accessibility purposes. So let’s create one!

Exploring MusicKit: Permissions

Adding the required key for accessing Apple Music and asking the user to give access.

Exploring MusicKit: WWDC 2022 Update

Exploring the many new structures added in MusicKit 2.0

Generic Error Handling in SwiftUI

Generalising error handling across view models and views in SwiftUI

Exploring tvOS Development: Carousel

Creating a carousel header view using TabView and ScrollView

Exploring tvOS Development: Navigation

The difference between Navigation in iOS and tvOS

Exploring tvOS Development: CardButtonStyle

Applying a motion effect to the button when it is in focus

Exploring tvOS Development: Introduction

Creating a great app experience on the biggest screen.

Using Open Graph in Swift

Get the Open Graph meta tags and display it in your app

Creating a framework in Swift

Frameworks are great for modularizing your code, breaking down reusable components into a separate bundle of code.

for-in loops in Swift

Learn how to use for-in loops with examples in using arrays, range operators, dictionaries, and enums.

Using Extensions in Swift

This overview with examples shows how you can use extensions in Swift.

Unit Testing to the Rescue

Writing unit tests after a blunder of a release.

Implementing Coordinator Pattern in SwiftUI

Looking at a peculiar case of showing the large title in the navigation bar conditionally

Adding Concurrency in Swift Package

Alternative methods to use the latest async-await syntax̱̱in a framework or Swift Package

Fixing Animations in UI Tests

Disabling the animations while running UI tests to ensure no flakiness

Displaying Live Photos Using PhotoKit and SwiftUI

I wasn’t aware that you could display live photos until recently. The first thought was to search for some documentation, and surprisingly, it is documented ...

Creating a New Playlist and Adding Shazamed Songs

Creating a new playlist in Apple Music and adding Shazamed songs to it using ShazamKit and MPMediaLibrary

Exploring MusicKit: Authentication

MusicKit for Swift makes it far easier to authenticate. No hassle of generating a JWT.

Experimenting with ShazamKit- Let’s Shazam Everything!

ShazamKit lets developers take advantage of Shazam's exact audio matching capabilities within their apps

Generic Rectangle View in Gradient and Chroma Game

Creating a generic view to use in the main screen of RGB, HSB, CMYK and history screen.

Protocols in Gradient and Chroma Game

Refactoring the code of my apps

Type Safety for Interface Controller Identifiers in WatchKit

Enum and extensions for strongly code string identifiers

Using WKInterfaceInlineMovie in SwiftUI or WatchKit

WKInterfaceInlineMovie that displays a video’s poster image and supports inline playing of the video.

Adding a Tip Jar in SwiftUI Using RevenueCat

I wanted to play around with RevenueCat, and I figured creating a tip jar would be the perfect start.