Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
docs: a skill for new Spotify versions, and what the phone checks taught
My-Name-Is-Jeff4ad6bea53939
diff --git a/.agents/skills/README.md b/.agents/skills/README.mdindex 215aadfd..7ec06219 100644--- a/.agents/skills/README.md+++ b/.agents/skills/README.md@@ -14,6 +14,7 @@ reads. `.claude/skills/` links each one back here, so Claude Code and the agentsanimation-vocabulary/ the name of a motion effect you can describe but not namephone-check/ install a build on the phone, drive it, take screenshots, read the tree and logclean-room-describer/ learn what upstream changed or what its users report, as behavior only+ spotify-version-check/ check the tweak against a new Spotify version, and read a Spotify method from the binaryThe motion skills write their examples in CSS and JavaScript. The rules carry over to UIKit as theyare: a spring is `-[UISpringTimingParameters initWithDampingRatio:initialVelocity:]` on adiff --git a/.agents/skills/phone-check/SKILL.md b/.agents/skills/phone-check/SKILL.mdindex d7c260d6..a429e18e 100644--- a/.agents/skills/phone-check/SKILL.md+++ b/.agents/skills/phone-check/SKILL.md@@ -27,6 +27,8 @@ Values that belong to one person's phone live in `.phone.env` at the repo root (for i in $(seq 1 15); do sleep 2; scripts/phone.py state >/dev/null 2>&1 && break; done- After a version change, What's New covers the screen. Close it with `scripts/phone.py tap --text Continue`.+- A launch on a locked phone fails with `BSErrorCodeDescription = Locked`, and every driver call after it+ says the app did not answer. That is not a crash. Ask the user to unlock the phone.## Drive@@ -38,6 +40,9 @@ needs `PHONE_HOST` and the token the app logs at launch, which it reads from theuser to open the page instead of probing further.- A swipe that only sets `contentOffset` (`scroll`) does not trigger scroll-driven behavior like the tabbar's minimize. Use `swipe` with a duration for that.+- There is no previous-track command. `scripts/phone.py seek 0`, then+ `scripts/phone.py tap --id SPTNowPlayingPreviousTrackButton` with the player open.+- `ls` in this shell is eza, which takes other flags (`ls -t` fails). Use `/bin/ls`.## Screenshots@@ -49,6 +54,13 @@ The driver's `screenshot` can come back blank. Take them through the tunnel instRead the cropped file with the Read tool. A full-height image is hard to judge; crop to the part in question.+Measure from the full-resolution PNG (3 px to the point on this phone) when the question is "a little off":++- Alignment: the first and last rows in a column band that have pixels brighter than a threshold give an+ element's vertical center. The volume glyphs sat at y 2271 against the track's 2264.5, 2 pt low.+- Blur: the mean absolute difference between pixels 3 px apart, across a band of rows. The redesigned+ player's header row read 0.72 blurred and about 5 sharp.+Privacy: a tunnel screenshot captures whatever is on screen. Check `scripts/phone.py state` first, and donot take one while the user is in another app.@@ -66,6 +78,30 @@ not take one while the user is in another app.says nothing about why it did nothing, add one log line per track or per change and rebuild, rather thanguessing.+## Crashes++When the driver stops answering and the app's process is gone (`xcrun devicectl device info processes+--device "$PHONE_UDID" | grep Spotify.app`), copy the crash reports off the phone, outside the sandbox:++ mkdir -p out/rep/crash && idevicecrashreport -k -f Spotify out/rep/crash++Every copied file gets the same modification time, so `ls -t` does not find the newest. Pick it by the+timestamp in its name (`Spotify-2026-10-10-171127.ips`), then print the faulting thread:++ python3 - out/rep/crash/Spotify-<stamp>.ips <<'EOF'+ import json, sys+ d = json.loads(open(sys.argv[1]).read().split('\n', 1)[1])+ print(d['captureTime'], d['exception'])+ images = d['usedImages']+ for f in d['threads'][d['faultingThread']]['frames'][:20]:+ print(images[f['imageIndex']].get('name'), f.get('symbol'), hex(f['imageOffset']))+ EOF++Frames in `spotifyglass.dylib` carry symbols. Frames in `Spotify` carry only an offset: add `0x100000000` and+find the method with the nearest start address at or below it in that version's `di-objc-<ver>.txt`+(`spotify-version-check`). A 9.1.90 crash at `0x105DBA98C` sat in `internalNavigateToURI:…`, which starts at+`0x105DBA91C`.+## View tree`scripts/phone.py tree` prints the visible screen's tree as indented text with frames, `hidden`, `a=` (alpha)diff --git a/.agents/skills/spotify-version-check/SKILL.md b/.agents/skills/spotify-version-check/SKILL.mdnew file mode 100644index 00000000..4985acca--- /dev/null+++ b/.agents/skills/spotify-version-check/SKILL.md@@ -0,0 +1,95 @@+---+name: spotify-version-check+description: >+ Check Vitrine against a new Spotify version: sweep every class, selector and ivar the tweak hooks or calls+ against the new build's class dump, and read a Spotify method's body from the binary when a selector is gone.+ Use when Vitrine moves to or adds a Spotify version, when a feature works on one version and not another, or+ when a selector or class the tweak needs has disappeared.+---++# Checking a new Spotify version++Spotify renames and removes Objective-C classes and selectors between versions. A hook on a missing class+fails at launch in `SGRequireClasses`, so it is easy to see. A selector the tweak *calls* is different: the+call sits behind `respondsToSelector:`, so a missing one does nothing and logs nothing. Sweep both.++## What 9.1.88 and later broke++| Feature | Cause | How it showed |+|---|---|---|+| Player morph from the now playing bar | `SPTBarOverlayPresentationTransition` gone; the player now opens through `MainUI_TabBarUIImpl.CompactOverlayTransition` | No morph; the hook sweep caught it |+| Tabs of the mod's own (`SGOpenSpotifyURI`) | `-[SPTLinkDispatcherImplementation navigateToURI:options:interactionID:]` gone | A tap did nothing; the sweep missed it, since the selector is called, not hooked |+| Redesigned player header blurred | iOS 26's scroll edge effect over a header inside the player's list | Not a Spotify change; found on the phone |++The second row is the reason this skill exists. Read the third as a reminder that the phone check+(`phone-check`) still runs after a clean sweep.++## The sweep++Class dumps of a version live in `notes/spotify-<ver>/data/` (gitignored): `di-objc-<ver>.txt` holds+`-[Class selector]` lines, `classes-<ver>.txt` every class name. `notes/spotify-9.1.90/tools/hook-sweep.py`+compares the tweak's `%hook` classes and methods, and its `NSClassFromString` and `SGRequireClasses` names,+against two versions. Copy the tools folder to the new version's notes and change the two version strings.++The hook sweep does not check what the tweak calls. Check these by hand, or extend the script:++ grep -rhoE 'respondsToSelector:@selector\(([^)]+)\)|NSSelectorFromString\(@"[^"]+"\)|@selector\([^)]+\)' tweak/Sources | sort -u+ grep -rhoE 'class_getInstanceVariable\([^,]+, "[^"]+"\)' tweak/Sources | sort -u++For each selector, find which class it is sent to in the code, then grep the new dump:++ grep -c '\[SPTLinkDispatcherImplementation navigateToURI:options:interactionID:\]' notes/spotify-<ver>/data/di-objc-<ver>.txt++A count of 0 on a selector that the old version had is a silent break. A Swift ivar (`class_getInstanceVariable`)+is not in the dump. Check it on the phone, or read the class's ivar list with `otool -ov` (below).++## Reading a method in the binary++When a selector is gone, read what the old version's method did. It is often a thin wrapper around one the new+version still has. Use Vitrine's own decrypted base IPAs in `ipa/` only. Never open upstream builds or the+Eevee+Chroma IPAs; the clean-room rule (`clean-room-describer`) still holds.++1. Unzip the binary outside the repo (`$CLAUDE_JOB_DIR/tmp` in a background job, else `$TMPDIR`). The+ later steps run in that folder:++ repo=$PWD; mkdir -p "$TMPDIR/s78" && cd "$TMPDIR/s78"+ unzip -o -q "$repo/ipa/Spotify-9.1.78.ipa" 'Payload/Spotify.app/Spotify'++2. Dump the Objective-C metadata once (about 170 MB, a minute) and find the class's method list:++ otool -arch arm64 -ov Payload/Spotify.app/Spotify > ov.txt+ grep -n 'name .* SPTLinkDispatcherImplementation$' ov.txt++ Under `baseMethods`, each entry has `name` (a selector reference), `types` and `imp`, and the address in+ parentheses is the absolute one. The list is relative, so the names are not printed. Match by `types`: a+ method of `v40@0:8@16q24@32` takes an object, a long and an object. A wrapper's `imp` is a few+ instructions before the next one's.++3. Disassemble the range. `dis.py` uses Xcode's `llvm-objdump` and names every `objc_msgSend$` stub:++ python3 -I "$repo/notes/spotify-9.1.90/tools/dis.py" Payload/Spotify.app/Spotify 0x109776338 0x109776350++ `/usr/bin/objdump` ignores `--start-address` on this binary and prints from the top. Use the Xcode one.+ `stubs.py` resolves single stub addresses (`adrp x1` + `ldr x1, [x1, #off]` to a selector reference; the+ pointer's low 36 bits under chained fixups, base `0x100000000`).++4. Read the arguments: `x0` self, `x1` the selector, `x2` onward the arguments in order. A class reference+ loaded before an `init…` stub gives the class. Search `ov.txt` for the reference's address to name it.++## What 9.1.78's link dispatcher did++The worked example behind the tabs fix (`Shared/Navigation/Links.x`):++ navigateToURI:options:interactionID:+ -> navigateToURI:sourceApplication:nil options: interactionID: completionHandler:nil resultHandler:nil+ -> reason = [[SPTUBINavigationReason alloc] initWithSourceApplication:nil interactionID:]+ -> navigateToURI:options:reason:completionHandler:resultHandler:++A nil reason crashes 9.1.90 (`swift_getEnumCaseMultiPayload`): a Swift reason is not optional just because the+selector takes an object. Build the argument the old wrapper built.++## After the sweep++- A fix for one version keeps the old version's path first where it still exists, so a supported version runs+ the code it ran before (`AGENTS.md`: 9.1.78 is the version Vitrine is made for).+- Check each fix on the phone with `phone-check`, and say which versions were run and which were not.diff --git a/.claude/skills/spotify-version-check b/.claude/skills/spotify-version-checknew file mode 120000index 00000000..aa6ee513--- /dev/null+++ b/.claude/skills/spotify-version-check@@ -0,0 +1 @@+../../.agents/skills/spotify-version-check\ No newline at end of filediff --git a/AGENTS.md b/AGENTS.mdindex 62d29a32..02709553 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -77,4 +77,8 @@ Rules:stacks (the tab bar, the now playing bar, the player) that is the system's: set every pane of themod's to `overrideUserInterfaceStyle = UIUserInterfaceStyleDark`, or it goes light in light mode. Present acontroller of the mod's through `SGPresentDark` (`Core/SGGlass.h`): a sheet's glass is its presentation's, and the- controller's own override does not reach it.+ controller's own override does not reach it. ARC does not know that `init` consumes its receiver: calling+ `alloc`/`init` through a cast `objc_msgSend` over-releases when `init` returns another object, so do both on+ `void *` and hand the result to `CFBridgingRelease`. A Logos hook on an `init…` that returns another object+ returns it with `CFBridgingRetain`, or the app crashes at launch. iOS 26's scroll edge effect blurs any header+ that sits inside its own scroll view; hide that list's `topEdgeEffect` (`Redesigned/Player/PlayerScroll.x`).