Sash Zats

  • llllm - LocalLLM for Open Web

    Jul 8, 2025

    A cross-platform macOS and iOS app that unlocks Apple’s on-device LLMs for any website, offering OpenAI-compatible APIs for privacy-preserving, low-latency AI directly in Safari, Chrome, and beyond. It bridges native-only limitations with a seamless developer and user experience.

  • Let's build Amphetamine

    Jun 10, 2018

    This is a first of what I hope will become a series of blog posts inspired by Mike Ash's let's build series.

  • iPhone X home button

    Dec 27, 2017

    As soon as I saw iPhone X home indicator replacing the physical button, I got interested in its behavior: it has to be visible both on the lock screen with an arbitrary wallpaper as a background and in any 3rd-party app showing arbitrary content, which in case of videos or games can also change quite quickly.

  • Markov Chains with GameplayKit

    Aug 29, 2015

    GameplayKit hides many amazing features: a random number generators, components architecture, path finding, state machines and more. Markov chains is another ingenious gem that can be utilised by games or apps to simulate natural patterns.

  • copy vs strong (retain)

    Aug 27, 2015

    The question when to use copy vs strong (ex retain) is getting quite old, so I decided to summarise rules I follow in one place. Mostly this is Objective-C-related post.

  • Fizz Buzz with GameplayKit

    Aug 15, 2015

    A great idea found at knowing.net and backported to swift.

  • GKRandomDistribution, GKShuffledDistribution and the GKGaussianDistribution

    Aug 15, 2015

    GameplayKit brings random numbers generation among other useful things. So what's the difference between GKRandomDistribution, GKGaussianDistribution and GKShuffledDistribution?

  • Improving view debugging in Xcode

    Jun 16, 2015

    Normally view debugging in Xcode is somewhat hard: you have to attribute bunch of faceless UIViews to relevant view controller.

  • Generational analysis for tests

    Feb 18, 2015

    Execute a typical scenario, returning to the original state. Repeat the scenario several (≥ 4) times. Call -[LeaksInstrument measure] after each run. Assert on -[LeaksInstrument hasLeaksInRepresentativeSession] being falsy.

  • Let's build toll-free bridged class

    Feb 14, 2015

    Source code for this blog post can be found at github: https://github.com/NSFW-Objective-C/Toll-Free-Bridging

  • Target-action for non-ui components. There is an easier way!

    Dec 23, 2014

    Use -[UIApplication sendAction:to:from:forEvent:] instead of calling action on target directly if you want responder chain behaviour for free.

  • Optimizing tests running time

    Dec 19, 2014

    In our app we run a mix of unit, functional and integration tests, for example: Credit card validator is a unit test. Tapping menu items takes you to the right section is a functional test. Tapping a product, adding it to cart and going through all of the purchase steps is an integration test.

  • Whose symbol is this?

    Oct 25, 2014

    Once in a while I found myself in need of finding who declared certain function or method. With Apple added support for iOS frameworks, the need in being sure where particular piece of code is coming is somewhat high.

  • A backport of NSProcessInfo isOperatingSystemAtLeastVersion

    Oct 19, 2014

    Make sure it's added to the current target, the class will take care of everything else.

  • Setting structures in Objective-C

    Oct 2, 2014

    You know how you always do this little dance to update couple of values on a structure property

  • Advanced NSProxy

    Jul 15, 2014

    Imagine your `Dog` class has a following method: Now imagine a mischievous `Cat` (a subclass of `NSProxy` obviously) wishing to get in a way…

  • Signing ipa for different team ids

    Jul 2, 2014

    As soon as you leave the cozy Xcode's build process, you find yourself fiddling with codesign dealing with, well, code signing. There are many tools that suppose to ease up the process: ota-tools, shenzhen and gists to name a few. However, once in a while you find yourself in need of more flexible solution.

  • NSArray's privates

    May 9, 2014

    Several private methods from `NSArray` API, complexity analysis, and how to implement it yourself.

  • Moarfonts after upgrading Xcode

    Apr 14, 2014

    We are using moarfonts for WSYIWYG-style preview in Interface Builder. And if you'r not doing it yet, you really should. However, after upgrading to Xcode 5.1.1 some of the team members started seeing a strange error while building the project.

  • State restoration: beyond iOS

    Apr 13, 2014

    Just a brief thought on Preservation & Restoration API. It occurred to me that extending this technology to Mac OS might give us much more seamless experience when switching between apps on Mac OS and iOS apps.

  • +initialize in categories

    Apr 12, 2014

    An interesting quirk for + initialize method when implemented in a category. Documentation doesn't really explain what is the correct behavior of the method, let's figure it out by ourselves.

  • Designing your own class cluster. Initializers.

    Apr 12, 2014

    I found myself creating a class cluster. Not just a notoriously studied subclass of `NSArray` or `UIButton` but a class cluster base class itself.

  • Radar: Xcode version editor not showing all commits

    Apr 12, 2014

    Starting from Xcode 4, IDE comes with a version editor allowing (in theory) to browse commits, diffs, blames, logs etc

  • NSDate is a model not a view

    Mar 17, 2014

    Following code [[NSDate date] dateByAddingTimeInterval:60 * 60] is a really common attempt to get the current time in, let's say, France. Despite developer's expectations, it does not represent current time in GMT+1 time zone. So where is all the confusion coming from?

  • RTFM performSelector:withObject:

    Mar 12, 2014

    Recently, while going through the code review, I stumbled upon a curious bug that manifested itself on iOS 7.1 64 bit simulator. A committer had a boolean setter that he wanted to call with a delay, so he had a following code

  • Storyboards

    Mar 12, 2014

    I've seen people quoting this Stack Overflow answer a lot when they need to convince someone not to use storyboards. I understand that it's a somewhat a flamewar topic, but I'd like to address the points author makes.

Follow me on Twitter Connect on LinkedIn Follow me on GitHub