Skip to content

Instantly share code, notes, and snippets.

@dive
dive / grammarly_ios_keyboard_unboxing.md
Last active February 1, 2026 11:55
Grammarly iOS Keyboard — Unboxing

Grammarly iOS Keyboard – Unboxing

Grammarly is a lovely writing assistant. Twenty million people use the tool across the globe according to the statistics available on the site. I use it too. No complaints, it does its job quite well, and I am a happy user. The only thing that always worried me is the Grammarly iOS Keyboard. As an iOS engineer, I know how easily you can collect different data, sensitive information, and even do not ask users about the consent. So, let's check what is inside the Grammarly iOS application.

TL;DR

  • Grammarly iOS uses at least three trackers (Adjust, AppsFlyer, Internal analytics)
  • Grammarly Keyboard has access to keystrokes, sensitive data, and able to send them over the network

Frameworks

@dive
dive / xcrun_xcode_development_tools.md
Last active December 16, 2022 01:48
Multiple Xcode versions or Why `xcrun` is your friend

Multiple Xcode versions or Why xcrun is your friend

The story

I recently spent a few hours helping a friend of mine investigate a weird issue in their Continuous Development infrastructure. Builds were failing with different fatal errors mostly related to SDK paths and .platform directory locations. At first sight, it was clear that something is wrong with the current selected Xcode, but all our initial attempts to catch the problem failed.

In the end, we isolated the problem; one of the tools they use changes PATH silently for the environment to simplify access to Xcode tools. Due to their internal logic, the CD pipeline changes a current selected Xcode a few times on the way within the same script. In some cases, the pipeline ended with xcodebuild in the environment's PATH that does not reflect the expected version after the xcode-select --switch command.

How? Pretty easy, actually. A simplified sequence looked like this:

@dive
dive / xed_xcode_invocation_tool.md
Last active May 8, 2026 17:16
Xcode invocation tool - xed

Xcode invocation tool - xed

xed is a command-line tool that launches the Xcode application and opens the given documents (xcodeproj, xcworkspace, etc.), or opens a new document, optionally with the contents of standard input.

If you work from the command line, this tool is a better option than open (which can open Xcode projects as well). Why?

  • xed knows about the current selected Xcode version (open behaves unpredictably if you have multiple Xcode installed)
  • You can use it open all files from a specific commit (with a little help explained below). It is useful on code-reviews or when you want to explore significant changes in the repository
  • You can use it as a "quick open" helper. Helps with monorepo phenomena, when you have hundreds of projects in the repository (I will show you an example below)
@dive
dive / firefox_87.b3_64_sample.txt
Created February 28, 2021 18:58
Firefox v87.0b3 (64-bit) on Mac mini M1 Sample – CVDisplayLink unresponsive
Sampling process 33134 for 1 second with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling firefox (pid 33134) every 1 millisecond
Process: firefox [33134]
Path: /Applications/Firefox.app/Contents/MacOS/firefox
Load Address: 0x1046b4000
Identifier: org.mozilla.firefox
Version: 87.0 (8721.2.25)
Code Type: ARM64
Platform: macOS
@dive
dive / neovim_m1_make.log
Created November 27, 2020 13:36
Make log for Neovim (master) on Apple Silicon (M1)
mkdir -p ".deps"
cd .deps && \
cmake -G 'Ninja' \
/Users/dive/Projects/github/neovim/third-party
-- The C compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Volumes/Extended/Archives/Xcode_12.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
@dive
dive / generate_xcworkspace.sh
Created November 8, 2020 21:30
Shell script to generate .xcworkspace with all .xcodeproj in the current directory
#!/usr/bin/env bash
set -eo pipefail
# Prepare the workspace in the TEMP directory
NAME="Temp.xcworkspace"
DATA_FILE="contents.xcworkspacedata"
TEMP_DIR=$(mktemp -d)
mkdir "${TEMP_DIR}/${NAME}"
touch "${TEMP_DIR}/${NAME}/${DATA_FILE}"
@dive
dive / pxed.sh
Created July 19, 2020 15:39
Shell script to scan and open Xcode projects in the current directory
#!/usr/bin/env bash
set -euo pipefail
declare -a PROJECTS=()
function XcodeProjectsInCurrentDirectory() {
TEMP_FILE=$(mktemp)
SEARCH_PATTERN="*${1}*.xcodeproj"
find . -iname "$SEARCH_PATTERN" -type d -print0 | sort -z > "$TEMP_FILE"
while IFS= read -r -d $'\0'; do
@dive
dive / modularisation_consequences_funcorp.md
Last active June 26, 2020 14:23
Links & Additional information for the talk

Катастрофически полезные последствия модуляризации в мире iOS и непрерывной интеграции

Tools

  • Xcodegen - a Swift command line tool for generating your Xcode project;
  • XcodeProj - read, update and write your Xcode projects;
  • XCLogParser - tool to parse xcactivitylog by Spotify;
@dive
dive / org-agenda-bulk-custom-functions.el
Created September 29, 2019 20:08
org-mode: org-agenda-bulk-custom-functions
(defun dive/org-mark-as-reviewed ()
"Mark current selected items as REVIEWED."
(org-set-property "REVIEWED" (org-time-stamp '(16) nil)))
(add-to-list 'org-agenda-bulk-custom-functions
'(?R dive/org-mark-as-reviewed))
@dive
dive / fix-emacs-permissions-catalina.el
Created September 29, 2019 09:55
Fix Emacs permissions on macOS Catalina
;;; package --- Fix permissions for Emacs.app on macOS Catalina
;;; Author: Artem Loenko
;;; Mail-To: <artyom.loenko@mac.com>
;;; Commentary:
;;; Code:
(defconst _default-emacs-app-plist-path "/Applications/Emacs.app/Contents/Info.plist")
(defconst _temp-buffer-name "*fixing Emacs permissions*")
(defconst _temp-buffer (get-buffer-create _temp-buffer-name))
(with-current-buffer _temp-buffer (erase-buffer))