-
llllm - LocalLLM for Open Web
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
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
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
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)
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
A great idea found at knowing.net and backported to swift.
-
GKRandomDistribution, GKShuffledDistribution and the GKGaussianDistribution
GameplayKit brings random numbers generation among other useful things. So what's the difference between GKRandomDistribution, GKGaussianDistribution and GKShuffledDistribution?
-
Improving view debugging in Xcode
Normally view debugging in Xcode is somewhat hard: you have to attribute bunch of faceless UIViews to relevant view controller.
-
Generational analysis for tests
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
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!
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
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?
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
Make sure it's added to the current target, the class will take care of everything else.
-
Setting structures in Objective-C
You know how you always do this little dance to update couple of values on a structure property
-
Advanced NSProxy
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
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
Several private methods from `NSArray` API, complexity analysis, and how to implement it yourself.
-
Moarfonts after upgrading Xcode
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
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
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.
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
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
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:
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
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.