Skip to content

Instantly share code, notes, and snippets.

View zats's full-sized avatar

Sash Zats zats

View GitHub Profile
@zats
zats / ContentView.swift
Last active August 14, 2025 12:13
Internal SF Symbols
struct ContentView: View {
var body: some View {
let names = [
["appstore.app.dashed", "buildings.3d", "emoji.chicken.face"],
["person.text.rectangle.and.nfc", "secure.element", "laugh.bubble.tapback.2.he"],
["apple.news", "apple.podcasts.square.stack", "apple.slice"],
]
VStack(spacing: 20) {
Grid(horizontalSpacing: 20, verticalSpacing: 20) {
ForEach(names, id: \.self) { nameRow in
@zats
zats / readme.md
Created October 12, 2023 03:08
Private SF Symbols

List of all the images in /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphsPrivate.bundle/Assets.car

NSBundle *const sfSymbolsBundle = [SFSCoreGlyphsBundle private];
_UIAssetManager *const assetManager = [_UIAssetManager assetManagerForBundle:sfSymbolsBundle];
UIImage *const image = [assetManager imageNamed:@"apple.breathe"];
@zats
zats / EnableVoiceOver.m
Last active September 24, 2023 16:46
Set voice over enabled with private API - not for AppStore
static void _setVoiceOver(BOOL enabled) {
NSString* const accessibilityUtilitiesPath = [[NSBundle bundleForClass:UIApplication.class]
.bundleURL
.URLByDeletingLastPathComponent
.URLByDeletingLastPathComponent
URLByAppendingPathComponent:@"PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities"]
.relativePath;
void* handler = dlopen([accessibilityUtilitiesPath cStringUsingEncoding:NSUTF8StringEncoding], RTLD_NOW);
if (!handler) {
return;
@zats
zats / REMAP_M1_KEYS.MD
Last active July 15, 2025 05:54
Apple M1 MacBook Do Not Disturb Key remapping

Following is a sample of LaungAgent that remaps do not disturb key to Siri (I am using Type to Siri)

This is a lightweight solution not relying on external apps.

Setting up

  1. Create ~/Library/LaunchAgents/com.local.KeyRemapping.plist
  2. Edit it to have following content
@zats
zats / EmojiTokensLoader.m
Last active November 22, 2023 15:52
[WIP] Emoji tokens - word matching with emojis as of macOS 12.1. So far only found a list of tokens, gotta find a mapping to the emojis
[[NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/EmojiFoundation.framework"] load];
EMFDefaultAutocompleteCandidateProvider *provider = [[EMFDefaultAutocompleteCandidateProvider alloc] initWithBundle:bundle];
[provider tokens]; // returns all the tokens recognized as emojis
@zats
zats / ApplePodcastToOMPL.js
Last active December 6, 2021 01:20
Export OPML from Apple Podcasts app on macOS
#!/usr/bin/env node
const { exit } = require('process');
const PREDEFINED_PATH = "~/Library/Group Containers/243LU875E5.groups.com.apple.podcasts/Documents/MTLibrary.sqlite";
const XML_TEMPLATE = `<?xml version="1.0"?>
<!-- example OPML file -->
<opml version="1.0">
<head>
<title>Overcast Podcast Subscriptions</title>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, DBGInterfaceStyleOverride) {
DBGInterfaceStyleOverrideNone = 0,
DBGInterfaceStyleOverrideLight,
DBGInterfaceStyleOverrideDark,
};
#ifdef __cplusplus
extern "C" {
@zats
zats / presenting.md
Last active July 6, 2018 13:02
Takeaways from "Presenting Design Work" - WWDC sessions 2018 https://developer.apple.com/videos/play/wwdc2018/811/

The presenter

Clarify your objectives

  • Establish your goals
  • Identify the questions you need answered
  • Understand the objective of your audiences
  • Don't dive into details before clarifying bigger picture

Embrace feedback

  • Take all feedback seriously even if disagree
  • Clarify the problems identified by the audience - separate problems highlighted from (potentially) invalid solutions suggested
  • Be willing to change your position
@zats
zats / rich-reminders.swift
Created April 7, 2018 21:08
This is a sample of how to add actionable button for Reminders (private API); demo video: https://youtu.be/q7LrO3VhI64
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution = true
let reminderListName = "Test"
import EventKit
extension EKCalendarItem {
var hack_action: AnyObject? {
set {
@zats
zats / ↔️.js
Created February 11, 2018 22:00
Bookmarklets for fullscreen, entering picture-in-picture, switching between fast and normal playback
javascript:document.getElementsByTagName('video')%5B0%5D.webkitEnterFullscreen()