Skip to content

Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.

C

feat: add IPA build pipeline

Vojtěch Škopek7f05d52e015b
diff --git a/.gitattributes b/.gitattributes
index dfe07704..cfe0f54b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,3 @@
# Auto detect text files and perform LF normalization
* text=auto
+*.deb binary
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..eb0db572
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.ipa
+out/
+tweak/.theos/
+tweak/obj/
+tweak/packages/
+.DS_Store
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..03afea67
--- /dev/null
+++ b/README.md
@@ -0,0 +1,15 @@
+# custom_spotify
+
+Liquid Glass for the Spotify iOS app, applied to a decrypted IPA without a jailbreak.
+
+ ./pipeline.sh src/com.spotify.client-9.1.78-Decrypted.ipa # FLEX + glass
+ ./pipeline.sh src/com.spotify.client-9.1.78-Decrypted.ipa --no-flex
+
+The result lands in `out/` fakesigned, ready for TrollStore. Sideloadly re-signs it.
+
+- `tweak/` — Theos tweak. Flips Spotify's own Liquid Glass flags (`Reprise_LiquidGlassKit`) and
+ replaces the now playing bar background with a `UIGlassEffect` pane.
+- `plist/liquid-glass.plist` — merged into Info.plist, turns `UIDesignRequiresCompatibility` off.
+- `deb/` — [AutoFLEX](https://github.com/pwnless/AutoFLEX) release, injected unless `--no-flex`.
+
+Runtime log lines are prefixed `[spotifyglass]`; read them in FLEX → System Log.
diff --git a/deb/com.hopeless.autoflex_0.0.1_iphoneos-arm.deb b/deb/com.hopeless.autoflex_0.0.1_iphoneos-arm.deb
new file mode 100644
index 00000000..ec66227d
Binary files /dev/null and b/deb/com.hopeless.autoflex_0.0.1_iphoneos-arm.deb differ
diff --git a/pipeline.sh b/pipeline.sh
new file mode 100755
index 00000000..98a9e456
--- /dev/null
+++ b/pipeline.sh
@@ -0,0 +1,53 @@
+#!/usr/bin/env bash
+# Builds the spotifyglass tweak and injects it (plus FLEX) into a decrypted Spotify IPA.
+#
+# ./pipeline.sh <decrypted.ipa> [-o out.ipa] [--no-flex]
+#
+# Needs: Theos in $THEOS (default ~/theos) with an iPhoneOS SDK in $THEOS/sdks,
+# gmake, ldid, dpkg-deb (brew) and cyan (uv tool install "cyan @ git+https://github.com/asdfzxcvbn/pyzule-rw").
+set -euo pipefail
+
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+THEOS="${THEOS:-$HOME/theos}"
+FLEX_DEB="$ROOT/deb/com.hopeless.autoflex_0.0.1_iphoneos-arm.deb"
+
+IN="" OUT="" WITH_FLEX=1
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -o) OUT="$2"; shift 2 ;;
+ --no-flex) WITH_FLEX=0; shift ;;
+ -h|--help) sed -n '2,7p' "$0"; exit 0 ;;
+ *) IN="$1"; shift ;;
+ esac
+done
+[ -f "$IN" ] || { echo "usage: $0 <decrypted.ipa> [-o out.ipa] [--no-flex]" >&2; exit 1; }
+
+need() { command -v "$1" >/dev/null 2>&1 || { echo "missing $1 -> $2" >&2; exit 1; }; }
+need gmake "brew install make"
+need ldid "brew install ldid"
+need dpkg-deb "brew install dpkg"
+need cyan "uv tool install 'cyan @ git+https://github.com/asdfzxcvbn/pyzule-rw'"
+ls "$THEOS"/sdks/iPhoneOS*.sdk >/dev/null 2>&1 || { echo "no iPhoneOS SDK in $THEOS/sdks" >&2; exit 1; }
+
+APP_DIR="$(unzip -Z1 "$IN" | grep -oE '^Payload/[^/]+\.app/' | head -1)"
+[ -n "$APP_DIR" ] || { echo "no Payload/*.app in $IN" >&2; exit 1; }
+VERSION="$(unzip -p "$IN" "${APP_DIR}Info.plist" > "$ROOT/out/.info.plist" && plutil -extract CFBundleShortVersionString raw -o - "$ROOT/out/.info.plist")"
+rm -f "$ROOT/out/.info.plist"
+OUT="${OUT:-$ROOT/out/Spotify-$VERSION-glass.ipa}"
+echo "==> Spotify $VERSION -> $OUT"
+
+echo "==> building tweak"
+# No Xcode on this machine: Theos would resolve tools through `xcrun -sdk iphoneos`, so name the CLT ones directly.
+export THEOS TARGET_CC=clang TARGET_CXX=clang++ TARGET_LD=clang++ \
+ TARGET_STRIP=strip TARGET_LIPO=lipo TARGET_CODESIGN_ALLOCATE=codesign_allocate TARGET_LIBTOOL=libtool
+gmake -C "$ROOT/tweak" clean package >/dev/null
+TWEAK_DEB="$(ls -t "$ROOT"/tweak/packages/*.deb | head -1)"
+echo " $TWEAK_DEB"
+
+FILES=("$TWEAK_DEB")
+[ "$WITH_FLEX" = 1 ] && FILES+=("$FLEX_DEB")
+
+echo "==> injecting"
+cyan -i "$IN" -o "$OUT" -f "${FILES[@]}" -l "$ROOT/plist/liquid-glass.plist" -s --overwrite
+
+echo "==> done: $OUT"
diff --git a/plist/liquid-glass.plist b/plist/liquid-glass.plist
new file mode 100644
index 00000000..243a2f46
--- /dev/null
+++ b/plist/liquid-glass.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>UIDesignRequiresCompatibility</key>
+ <false/>
+</dict>
+</plist>
diff --git a/tweak/Makefile b/tweak/Makefile
new file mode 100644
index 00000000..6209c653
--- /dev/null
+++ b/tweak/Makefile
@@ -0,0 +1,15 @@
+TARGET := iphone:clang:latest:16.0
+ARCHS := arm64
+FINALPACKAGE := 1
+
+include $(THEOS)/makefiles/common.mk
+
+TWEAK_NAME := spotifyglass
+
+spotifyglass_FILES := Tweak.x
+spotifyglass_CFLAGS := -fobjc-arc
+spotifyglass_FRAMEWORKS := UIKit
+# Runtime swizzling instead of Substrate so the dylib has no extra dependency inside the IPA.
+spotifyglass_LOGOS_DEFAULT_GENERATOR := internal
+
+include $(THEOS_MAKE_PATH)/tweak.mk
diff --git a/tweak/Tweak.x b/tweak/Tweak.x
new file mode 100644
index 00000000..a41b7271
--- /dev/null
+++ b/tweak/Tweak.x
@@ -0,0 +1,86 @@
+#import <UIKit/UIKit.h>
+#import <objc/runtime.h>
+
+// iOS 26 API, absent from the SDK Theos builds against.
+@interface UIGlassEffect : UIVisualEffect
+@property (nonatomic, copy) UIColor *tintColor;
+@property (nonatomic, getter=isInteractive) BOOL interactive;
+@end
+
+@interface UIView (SpotifyGlassPrivate)
+- (NSString *)recursiveDescription;
+@end
+
+#define SGLog(fmt, ...) NSLog(@"[spotifyglass] " fmt, ##__VA_ARGS__)
+
+static UIVisualEffect *glassEffect(void) {
+ Class glass = NSClassFromString(@"UIGlassEffect");
+ if (glass) return [[glass alloc] init];
+ return [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemChromeMaterialDark];
+}
+
+static char kGlassViewKey;
+
+// Puts a glass pane behind everything in `bar`, sized to it, following its corner radius.
+static void installGlass(UIView *bar) {
+ UIVisualEffectView *glass = objc_getAssociatedObject(bar, &kGlassViewKey);
+ if (!glass) {
+ glass = [[UIVisualEffectView alloc] initWithEffect:glassEffect()];
+ glass.userInteractionEnabled = NO;
+ glass.clipsToBounds = YES;
+ glass.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+ objc_setAssociatedObject(bar, &kGlassViewKey, glass, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+ SGLog(@"glass installed on %@ (effect %@)", bar.class, glass.effect.class);
+ }
+ glass.frame = bar.bounds;
+ glass.layer.cornerRadius = bar.layer.cornerRadius;
+ if (glass.superview != bar) [bar insertSubview:glass atIndex:0];
+ else [bar sendSubviewToBack:glass];
+}
+
+// --- Spotify's own Liquid Glass (Reprise_LiquidGlassKit), remote-config gated ---
+
+%hook _TtC33Reprise_LiquidGlassPropertiesImpl25LiquidGlassPropertiesImpl
+- (BOOL)isContextMenuInNavigationBarEnabled { return YES; }
+%end
+
+%hook SPTHubViewController
+- (BOOL)prefersLiquidGlassNavigationBar { return YES; }
+%end
+
+// --- Now playing bar: the colored rounded card is NowPlayingBarTopStack ---
+
+%hook _TtC18NowPlaying_BarImpl21NowPlayingBarTopStack
+- (void)setBackgroundColor:(UIColor *)color {
+ %orig([UIColor clearColor]);
+}
+- (void)layoutSubviews {
+ %orig;
+ ((UIView *)self).layer.backgroundColor = nil;
+ installGlass((UIView *)self);
+}
+%end
+
+%hook _TtC18NowPlaying_BarImpl36NowPlayingBarContainerViewController
+- (void)viewDidLayoutSubviews {
+ %orig;
+ static dispatch_once_t once;
+ dispatch_once(&once, ^{
+ SGLog(@"now playing bar hierarchy:\n%@", [((UIViewController *)self).view recursiveDescription]);
+ });
+}
+%end
+
+%ctor {
+ %init;
+ NSArray *targets = @[
+ @"_TtC33Reprise_LiquidGlassPropertiesImpl25LiquidGlassPropertiesImpl",
+ @"SPTHubViewController",
+ @"_TtC18NowPlaying_BarImpl21NowPlayingBarTopStack",
+ @"_TtC18NowPlaying_BarImpl36NowPlayingBarContainerViewController",
+ ];
+ for (NSString *name in targets) {
+ if (!NSClassFromString(name)) SGLog(@"class %@ not found, its hooks are inactive", name);
+ }
+ SGLog(@"loaded, UIGlassEffect %@", NSClassFromString(@"UIGlassEffect") ? @"available" : @"missing");
+}
diff --git a/tweak/control b/tweak/control
new file mode 100644
index 00000000..58f1b75d
--- /dev/null
+++ b/tweak/control
@@ -0,0 +1,8 @@
+Package: com.vojta.spotifyglass
+Name: spotifyglass
+Version: 0.1.0
+Architecture: iphoneos-arm
+Description: Liquid Glass for the Spotify iOS app
+Maintainer: vojta
+Author: vojta
+Section: Tweaks
diff --git a/tweak/spotifyglass.plist b/tweak/spotifyglass.plist
new file mode 100644
index 00000000..4bb2b962
--- /dev/null
+++ b/tweak/spotifyglass.plist
@@ -0,0 +1 @@
+{ Filter = { Bundles = ( "com.spotify.client" ); }; }