Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
chore: build against the iOS 26+ SDK instead of 16.5
Vojtěch Škopek23a675176aff
diff --git a/.github/workflows/build-ipa.yml b/.github/workflows/build-ipa.ymlindex 4ef0d521..8d7bbd6b 100644--- a/.github/workflows/build-ipa.yml+++ b/.github/workflows/build-ipa.yml@@ -15,8 +15,6 @@ on:env:THEOS: ${{ github.workspace }}/theos- # The same SDK the tweak is built against locally; a newer one already declares UIGlassEffect.- SDK: iPhoneOS16.5.sdkjobs:build:@@ -40,9 +38,6 @@ jobs:run: |brew install make dpkg ldidpython3 -m pip install --break-system-packages git+https://github.com/asdfzxcvbn/pyzule-rw.git- git clone --depth 1 --filter=blob:none --sparse https://github.com/theos/sdks "$RUNNER_TEMP/sdks"- git -C "$RUNNER_TEMP/sdks" sparse-checkout set "$SDK"- mkdir -p theos/sdks && mv "$RUNNER_TEMP/sdks/$SDK" theos/sdks/- name: Download IPArun: |diff --git a/README.md b/README.mdindex a61871c1..245c2d10 100644--- a/README.md+++ b/README.md@@ -81,7 +81,7 @@ masked in the log and the result stays in your fork.### On a Mac-Theos in `~/theos` with an iPhoneOS SDK in `~/theos/sdks`, plus:+Theos in `~/theos` and an iPhoneOS 26 or newer SDK, from Xcode (`xcode-select` it) or in `~/theos/sdks`, plus:brew install make ldid dpkg zsign ideviceinstaller libimobiledeviceuv tool install "cyan @ git+https://github.com/asdfzxcvbn/pyzule-rw"diff --git a/scripts/pipeline.sh b/scripts/pipeline.shindex 1bc91149..db648a59 100755--- a/scripts/pipeline.sh+++ b/scripts/pipeline.sh@@ -7,7 +7,7 @@## The IPA is yours to supply: drop a decrypted Spotify .ipa in ipa/ and the Makefile finds it.#-# Needs: Theos in $THEOS (default ~/theos) with an iPhoneOS SDK in $THEOS/sdks,+# Needs: Theos in $THEOS (default ~/theos), an iPhoneOS 26+ SDK from the selected Xcode or in $THEOS/sdks,# gmake, ldid, dpkg-deb (brew) and cyan (uv tool install "cyan @ git+https://github.com/asdfzxcvbn/pyzule-rw").set -euo pipefail@@ -44,7 +44,9 @@ 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; }+ls -d "$THEOS"/sdks/iPhoneOS*.sdk "$(xcode-select -p 2>/dev/null)"/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk 2>/dev/null \+ | grep -qE 'iPhoneOS(2[6-9]|[3-9][0-9])\.' \+ || { echo "no iPhoneOS 26+ SDK: xcode-select an Xcode 26 or newer, or put the SDK in $THEOS/sdks" >&2; exit 1; }# cyan skips -k with only a warning when its environment has no Pillow.if [ -n "$ICON" ]; then[ -f "$ICON" ] || { echo "no such icon: $ICON" >&2; exit 1; }diff --git a/tweak/Makefile b/tweak/Makefileindex e523c055..60320c07 100644--- a/tweak/Makefile+++ b/tweak/Makefile@@ -1,6 +1,4 @@-# Pinned, not `latest`: Theos resolves `latest` across Xcode's SDKs too, and an iOS 26 SDK-# declares the API SGRuntime.h forward-declares.-TARGET := iphone:clang:16.5:16.0+TARGET := iphone:clang:latest:16.0ARCHS := arm64FINALPACKAGE := 1diff --git a/tweak/Sources/Core/SGRuntime.h b/tweak/Sources/Core/SGRuntime.hindex 32a90e58..ff26bc0c 100644--- a/tweak/Sources/Core/SGRuntime.h+++ b/tweak/Sources/Core/SGRuntime.h@@ -1,21 +1,7 @@-// Declarations the SDK Theos builds against does not have: iOS 26 API and private UIKit.-// Everything here is resolved at runtime; a call site checks respondsToSelector: first.+// Private UIKit the SDK does not declare.#import <UIKit/UIKit.h>#import <objc/runtime.h>-@interface UIGlassEffect : UIVisualEffect-+ (instancetype)effectWithStyle:(NSInteger)style;-@property (nonatomic, copy) UIColor *tintColor;-@property (nonatomic, getter=isInteractive) BOOL interactive;-@end--@interface NSObject (SGiOS26)-+ (id)capsuleConfiguration;-+ (id)configurationWithUniformRadius:(id)radius;-+ (id)fixedRadius:(CGFloat)radius;-- (void)setCornerConfiguration:(id)configuration;-@end-@interface UIView (SGPrivate)- (NSString *)recursiveDescription;@end@@ -23,16 +9,3 @@@interface UIViewController (SGPrivate)- (NSString *)_printHierarchy;@end--@interface UIButtonConfiguration (SGiOS26)-+ (instancetype)glassButtonConfiguration;-+ (instancetype)prominentGlassButtonConfiguration;-@end--@interface UIImageView (SGiOS17)-- (void)addSymbolEffect:(id)effect;-@end--@interface NSObject (SGiOS17)-+ (id)effect; // NSSymbolBounceEffect and the other symbol effects-@enddiff --git a/tweak/Sources/Features/Navbar/TabBar.x b/tweak/Sources/Features/Navbar/TabBar.xindex abb2fddc..73ab6b5a 100644--- a/tweak/Sources/Features/Navbar/TabBar.x+++ b/tweak/Sources/Features/Navbar/TabBar.x@@ -68,7 +68,7 @@ static BOOL hasInk(UIImage *image) {size_t width = CGImageGetWidth(cg), height = CGImageGetHeight(cg);if (!width || !height) return NO;NSMutableData *pixels = [NSMutableData dataWithLength:width * height];- CGContextRef context = CGBitmapContextCreate(pixels.mutableBytes, width, height, 8, width, NULL, kCGImageAlphaOnly);+ CGContextRef context = CGBitmapContextCreate(pixels.mutableBytes, width, height, 8, width, NULL, (CGBitmapInfo)kCGImageAlphaOnly);CGContextDrawImage(context, CGRectMake(0, 0, width, height), cg);CGContextRelease(context);const uint8_t *alpha = pixels.bytes;diff --git a/tweak/Sources/Features/Onboarding/Tour.m b/tweak/Sources/Features/Onboarding/Tour.mindex e239b402..1bb179ee 100644--- a/tweak/Sources/Features/Onboarding/Tour.m+++ b/tweak/Sources/Features/Onboarding/Tour.m@@ -287,8 +287,7 @@ static SGTourRow *actionRow(NSString *symbol, NSString *title, NSString *subtitl[super viewDidAppear:animated];if (_shown) return;_shown = YES;- Class bounce = NSClassFromString(@"NSSymbolBounceEffect");- if (bounce && [_hero respondsToSelector:@selector(addSymbolEffect:)]) [_hero addSymbolEffect:[bounce effect]];+ if (@available(iOS 17.0, *)) [_hero addSymbolEffect:[NSClassFromString(@"NSSymbolBounceEffect") effect]];}@end@@ -373,10 +372,8 @@ static SGTourRow *actionRow(NSString *symbol, NSString *title, NSString *subtitlstatic UIButton *glassButton(NSString *title, BOOL prominent) {UIButtonConfiguration *config;- if (prominent && [UIButtonConfiguration respondsToSelector:@selector(prominentGlassButtonConfiguration)]) {- config = [UIButtonConfiguration prominentGlassButtonConfiguration];- } else if (!prominent && [UIButtonConfiguration respondsToSelector:@selector(glassButtonConfiguration)]) {- config = [UIButtonConfiguration glassButtonConfiguration];+ if (@available(iOS 26.0, *)) {+ config = prominent ? [UIButtonConfiguration prominentGlassButtonConfiguration] : [UIButtonConfiguration glassButtonConfiguration];} else {config = prominent ? [UIButtonConfiguration filledButtonConfiguration] : [UIButtonConfiguration grayButtonConfiguration];}