Home
PinYuanChen
Cancel

Mocking Network Requests with URLProtocol

Notice: The content presented in this blog post is inspired by and derived from the Essential Developer course. All credit for the foundational concepts and methodologies goes to the creators o...

Data Sync Problem After Support Cloud Kit for Core Data

I recently utilized Core Data as the local persistence layer for my side project and discovered its compatibility with CloudKit for remote storage. Given that both Core Data and CloudKit are offeri...

Do Not Create Your SUT in the setUpWithError

As a beginner in unit testing, you may face confusion when setting up your system under test (SUT). If you’re not familiar with the workings of the XCTest Framework, you may encounter unexpected er...

Delayed Deallocation Caused By Nested Closures

I assume you have basic concepts about Retain Cycles and know how to avoid them by adding [weak self] inside closures. However, you may still encounter situations where you cannot release objects a...

RxSwift: combineLatest, withLatestFrom, zip, merge

Let’s get straight to the point. What’re the differences? combineLatest It combines multiple observable sources and when each of them emits an item, it will fetch the other sources’ latest items a...

Combine: Handle dataTaskPublisher Results

Recently I was playing with Combine and I kind of liked its succinct syntax. Combine offers plenty of handy operators to handle asynchronicity, making the processing of URL task results looks elega...

Debounce and Throttle in RxSwift

In some cases, we need to restrict the number of queries in a time span, so we can avoid overhead and make sure the app runs properly. That’s when debounce and throttle weight in. These two are sim...

Migrate Xcode Snippets

We developers all want to boost our productivity and snippet gives us a hand. You can simply type some keywords to retrieve a bunch of boilerplate code. If you have no idea how to create and edit s...