Creating a 2D Space Game for iOS Using SpriteKit - Part 1

Introduction I have never tried creating a game before; it feels like magic to me. I know that games have an enormous amount of underlying layers of abstractions and tools such as game engines, rendering, and so on. I have always been eager to learn at least 1% of the game creation process. In this article, I’m going to explore step-by-step instructions for creating a game for the iOS platform using SpriteKit....

June 28, 2024 · 2 min · Dmytro Chumakov

Combine practical usage examples

Introduction When working in a large codebase with a significant number of async events, I often found myself in situations where I couldn’t combine events effectively. This resulted in optimization problems and inefficient consumption of OS resources. The codebase contained closures and async/await, so it wasn’t possible to use operators like merge or combineLatest. After discovering this limitation, I decided to add new methods using Combine. I will be demonstrating this with a simple NetworkService responsible only for executing and validating requests using Combine....

June 22, 2024 · 2 min · Dmytro Chumakov

Testing push notifications locally in an iOS app

Introduction I always wondered how I could automate testing the push notification process. Even when Apple introduced the possibility of dragging a configured file to the simulator to display a notification, it is still a manual process. I’ll skip testing via the terminal because I think it takes more time than using an APNS file or the RocketSim app. Before I was first introduced to the RocketSim app, I used an APNS file for testing push notifications....

June 19, 2024 · 2 min · Dmytro Chumakov

Adding Push Notifications to an iOS App

Introduction If you start a project from scratch, you need to always create some kind of service like PushNotificationService that will be responsible for handling push notification events. In this article, I want to explore a simple implementation of PushNotificationService to be able to reuse and customize it in future projects. First Step The first step is to add the Push Notifications capability to your project. Go to your project -> Signing & Capabilities -> Tap + Capability -> Search for Push Notifications....

June 14, 2024 · 2 min · Dmytro Chumakov

Caching data using NSCache in iOS

Introduction I was curious about caching data using NSCache for an iOS app. So, I did some digging. Here is what I found: Quick Overview NSCache helps store data in memory. When the application gets killed, it frees memory; it’s not persisted on disk. Storing data is carried out using a key-value pair mechanism like Dictionary. You can set automatic eviction to delete objects automatically. NSCache has multi-platform support: iOS, iPadOS, watchOS, macOS, and tvOS....

June 5, 2024 · 3 min · Dmytro Chumakov