Portrait

I2H3

Notes from work as an app developer for iPhones, iPads and Macs.

RSS Icon GitHub Mastodon

Result Builders To Mock File System

I need to maintain a virtual file system in a CoreData database. Setting up test scenarios is tiresome, so I made use of result builders and its nice.

Convenient NSPredicate Initializers

There is a better way than to repeat the same or similar NSPredicate all the time and it is very nice to read.

Execution Order of Multiple Defer Blocks

I rarely need to use defer blocks and mostly it is for ending signpost intervals. I checked the possible situation of having multiple and in which order they are executed.

Signposting Macro

I was very excited about macros because they allow the reduction of boilerplate code like handling signposts. This macro reduces signposting in a method to a single word expression.

FileManager Throws Error on Getting File Provider Services

I found out how to successfully get replicated file provider services by URL on iOS which previously was impossible due to FileManager throwing a cryptic error.