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

fix: rename fake premium to spoof premium

Vojtěch Škopekcdb0afa012cc
diff --git a/README.md b/README.md
index 12460a50..0f5cb176 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ What is in, and what is next.
- [x] Liquid Glass, every flag of it at once
- [x] AMOLED black, Home gradient
- [x] Ad blocking
-- [x] Pretend to be Premium
+- [x] Spoof Premium
- [x] Tracker blocking
- [x] Custom tab bar
- [x] Double tap zones on the player
diff --git a/docs/tweaks.md b/docs/tweaks.md
index 01120d6a..69f45222 100644
--- a/docs/tweaks.md
+++ b/docs/tweaks.md
@@ -73,11 +73,11 @@ glass tab bar, search field and Spotify's own glass, AMOLED and the accent colou
four heights; then hide sections of the Home tab and Spotify's home and library flags), Playlist
(hide the cover, the header's text and buttons, the curation pills) and Player (glass, Spotify's
player flags, hide buttons and cards of the full screen player, then the queue, controls and now
-playing bar flags, the lock screen widget's, and a Lyrics page under it). Ads & privacy (every flag
-switch forces a flag Spotify ships on to off: the ad on app open, upsells, tooltips, the DJ badge;
-an Ad blocking page under it, EeveeSpotify's layers behind three switches that start off: hide ads,
-hide upsells and pretend to be Premium, with a count of what each stopped; then telemetry blocking
-with a count of what it has stopped) and Labs (features Spotify built and did not ship, and AI Chat
+playing bar flags, the lock screen widget's, and a Lyrics page under it). Premium & ads (EeveeSpotify's
+three switches, off until switched on: spoof Premium, hide ads and hide upsells, with a count of what
+each stopped; an Ad and upsell flags page under it, every switch forcing a flag Spotify ships on to
+off: the ad on app open, upsells, tooltips, the DJ badge; then telemetry blocking with a count of
+what it has stopped) and Labs (features Spotify built and did not ship, and AI Chat
(Martini) under it). Then All flags, Spotify's remote-config flags with a search field and an
Auto / Off / On control per flag (a text field for the number and text ones), and Mod: the build
and Spotify's version, the update check, the site and the repo, the welcome tour again and Reset
diff --git a/tweak/Sources/Features/AdBlock/AdBlock.h b/tweak/Sources/Features/AdBlock/AdBlock.h
index 4fc00437..1a1d82b3 100644
--- a/tweak/Sources/Features/AdBlock/AdBlock.h
+++ b/tweak/Sources/Features/AdBlock/AdBlock.h
@@ -1,8 +1,8 @@
-// Ad blocking: EeveeSpotify's layers, ported. Three switches, each off until asked for. Hide ads
+// EeveeSpotify's layers, ported, at the top of the Premium & ads page. Three switches, each off until asked for. Hide ads
// keeps the ad services from starting (AdServices.x), takes ad components out of Home and Search
// before they render (AdHubs.x, Feeds.m) and answers the requests behind them empty (AdNetwork.x).
// Hide upsells drops the Premium prompts (AdPopups.x, AdServices.x) and forces the flags that show
-// them off (AdBlock.m, through Flags.x). Pretend to be Premium rewrites the product state and remote
+// them off (AdBlock.m, through Flags.x). Spoof Premium rewrites the product state and remote
// config as they arrive (Premium.m) and keeps the session alive when the server disagrees
// (AdNetwork.x).
#import <UIKit/UIKit.h>
@@ -11,13 +11,13 @@
#define SGKeyHideUpsells @"spotifyglass.adblock.upsells"
#define SGKeyFakePremium @"spotifyglass.adblock.premium"
-// What a switch turning Pretend to be Premium on is told first.
+// What a switch turning Spoof Premium on is told first.
extern NSString *const SGFakePremiumWarning;
// A flag the ads or upsells switch forces off while it is on. Flags.x asks, and the row for it locks.
BOOL SGAdBlockForcesFlagOff(NSString *key);
-// What the hooks stopped, by kind, for the Ad blocking page (nil label for all of them).
+// What the hooks stopped, by kind, for the counts under the switches (nil label for all of them).
void SGAdBlockCountOne(NSString *label);
NSArray<NSString *> *SGAdBlockLabels(void);
NSUInteger SGAdBlockCount(NSString *label);
@@ -32,4 +32,6 @@ NSData *SGPatchBootstrap(NSData *body);
// were none, or the bytes were not the shape expected.
NSData *SGStripFeed(NSData *body);
-UIViewController *SGAdBlockSettingsPage(void);
+@class SGModSection;
+// The three switches and what they have stopped, at the top of the Premium & ads page.
+NSArray<SGModSection *> *SGAdBlockSections(void);
diff --git a/tweak/Sources/Features/AdBlock/AdBlockSettings.m b/tweak/Sources/Features/AdBlock/AdBlockSettings.m
index 4de8e879..187aa04e 100644
--- a/tweak/Sources/Features/AdBlock/AdBlockSettings.m
+++ b/tweak/Sources/Features/AdBlock/AdBlockSettings.m
@@ -3,7 +3,7 @@
NSString *const SGFakePremiumWarning = @"This is the part of EeveeSpotify Spotify's takedown went after, and it has not been tested here. It can end in a forced logout or worse for the account. A Premium account gains nothing from it.";
-UIViewController *SGAdBlockSettingsPage(void) {
+NSArray<SGModSection *> *SGAdBlockSections(void) {
NSMutableArray<SGModRow *> *counts = [NSMutableArray array];
for (NSString *label in SGAdBlockLabels()) {
[counts addObject:SGStatRow(label, ^NSString *{
@@ -13,17 +13,17 @@ UIViewController *SGAdBlockSettingsPage(void) {
[counts addObject:SGStatRow(@"Total", ^NSString *{
return @(SGAdBlockCount(nil)).stringValue;
})];
- SGModRow *fakePremium = SGOptionRow(@"Pretend to be Premium", @"Rewrite the product state and config the server sends to a Premium account's, and answer the logout it sends back as done. Free accounts only", SGKeyFakePremium);
+ SGModRow *fakePremium = SGOptionRow(@"Spoof Premium", @"Free accounts only. The product state and config the server sends are rewritten to a Premium account's, and the logout it sends back is answered as done", SGKeyFakePremium);
fakePremium.warning = SGFakePremiumWarning;
- return [[SGModPage alloc] initWithTitle:@"Ad blocking" intro:SGRestartNote sections:@[
- SGSection(@"From EeveeSpotify", @[
+ return @[
+ SGSection(nil, @[
+ fakePremium,
SGOptionRow(@"Hide ads", @"The ad services never start, ad components leave Home and Search before they render, and the requests behind them are answered empty", SGKeyHideAds),
SGOptionRow(@"Hide upsells", @"Premium prompts, banners and sheets dropped, and the flags that show them forced off", SGKeyHideUpsells),
- fakePremium,
]),
SGSection(@"Blocked so far", counts),
SGSection(nil, @[
SGActionRow(@"Reset the counters", @"Start counting from zero", ^{ SGResetAdBlock(); }),
]),
- ] footer:@"All three are off until switched on, and none is needed on a Premium account, which has no ads to block. Audio ads between songs are the Premium switch's to stop; the other two only reach what is drawn."];
+ ];
}
diff --git a/tweak/Sources/Features/AdBlock/AdNetwork.x b/tweak/Sources/Features/AdBlock/AdNetwork.x
index 2a8ace30..bf242bcc 100644
--- a/tweak/Sources/Features/AdBlock/AdNetwork.x
+++ b/tweak/Sources/Features/AdBlock/AdNetwork.x
@@ -1,6 +1,6 @@
// Spotify's responses on their way in, through the URLSession delegates it reads them by:
// SPTDataLoaderService for most of spclient, HttpClientURLSession for what some regions route the
-// other way. A request for an ad is answered empty. With Pretend to be Premium on, the bootstrap
+// other way. A request for an ad is answered empty. With Spoof Premium on, the bootstrap
// and customize bodies are rewritten by Premium.m before the client sees them, the endpoints the
// server would use to log the account out are answered as if they succeeded, and past the first
// thirty seconds the re-fetches that could bring the real state back are cancelled before they
diff --git a/tweak/Sources/Features/AdBlock/Premium.m b/tweak/Sources/Features/AdBlock/Premium.m
index 356f44e3..3ad0a195 100644
--- a/tweak/Sources/Features/AdBlock/Premium.m
+++ b/tweak/Sources/Features/AdBlock/Premium.m
@@ -1,4 +1,4 @@
-// Pretend to be Premium: the UCS response, which carries the account's product state and its remote
+// Spoof Premium: the UCS response, which carries the account's product state and its remote
// config, rewritten as it arrives. The attributes and the flag rules are EeveeSpotify's. Offline,
// audio quality and the social session attributes are left alone: the server still decides those,
// and a spoofed one only shows UI the request behind it will fail.
diff --git a/tweak/Sources/Features/Flags/FlagPages.m b/tweak/Sources/Features/Flags/FlagPages.m
index 82c2a9da..c3356a7a 100644
--- a/tweak/Sources/Features/Flags/FlagPages.m
+++ b/tweak/Sources/Features/Flags/FlagPages.m
@@ -35,13 +35,11 @@ NSArray<SGModSection *> *SGPlaybackSections(void) {
];
}
-// Every flag switch here forces a flag Spotify ships on to off, so the titles name the blocking: on
-// stops the thing, off is Spotify's own value. The telemetry sections come from Privacy.
-UIViewController *SGAdsSettingsPage(void) {
- NSMutableArray<SGModSection *> *sections = [NSMutableArray arrayWithArray:@[
- SGSection(nil, @[
- SGPageRow(@"Ad blocking", ^UIViewController *{ return SGAdBlockSettingsPage(); }),
- ]),
+// Every switch here forces a flag Spotify ships on to off, so the titles name the blocking: on stops
+// the thing, off is Spotify's own value. Hide ads and Hide upsells already force the first two
+// sections off, which locks those rows.
+static UIViewController *adFlagsPage(void) {
+ return [[SGModPage alloc] initWithTitle:@"Ad and upsell flags" intro:SGRestartNote sections:@[
SGSection(@"Ads", @[
SGKillRow(@"Block the ad when the app opens", @"ios-feature-adonappopen.enabled"),
SGKillRow(@"Block its CTA card", @"ios-feature-adonappopen.cta_card_enabled"),
@@ -69,10 +67,19 @@ UIViewController *SGAdsSettingsPage(void) {
SGSection(nil, @[
SGFlagRow(@"Reduce interventions", @"ios-messaging-reduceinterventions-impl.enabled"),
]),
- ]];
+ ] footer:@"The tooltip switches belong to Spotify's own intervention-reduction system, which Reduce interventions turns on."];
+}
+
+// The switches first, the flags they already cover behind a page of their own: turning Hide ads on
+// is what most of this page is for, and every row under it follows from that one.
+UIViewController *SGAdsSettingsPage(void) {
+ NSMutableArray<SGModSection *> *sections = [NSMutableArray arrayWithArray:SGAdBlockSections()];
+ [sections addObject:SGSection(nil, @[
+ SGPageRow(@"Ad and upsell flags", ^UIViewController *{ return adFlagsPage(); }),
+ ])];
[sections addObjectsFromArray:SGPrivacySections()];
- return [[SGModPage alloc] initWithTitle:@"Ads & privacy" intro:SGRestartNote sections:sections
- footer:@"The tooltip switches belong to Spotify's own intervention-reduction system, which Reduce interventions turns on."];
+ return [[SGModPage alloc] initWithTitle:@"Premium & ads" intro:SGRestartNote sections:sections
+ footer:@"The three switches come from EeveeSpotify and are off until switched on; none is needed on a Premium account, which has no ads to block. Audio ads between songs are Spoof Premium's to stop, the other two only reach what is drawn."];
}
static UIViewController *martiniPage(void) {
diff --git a/tweak/Sources/Features/Flags/Flags.h b/tweak/Sources/Features/Flags/Flags.h
index 2777af85..108935e6 100644
--- a/tweak/Sources/Features/Flags/Flags.h
+++ b/tweak/Sources/Features/Flags/Flags.h
@@ -1,7 +1,7 @@
// Flags: Spotify's remote-config flags. Flags.x forces an override into the configuration
// provider; SGFlagList.m is the table of every flag, generated from the IPA by
// scripts/extract-flags.py; FlagsPage.m is the searchable All flags page and FlagPages.m the flags
-// by topic: the Ads & privacy and Labs pages, and the playback and lock screen sections of Player.
+// by topic: the Premium & ads and Labs pages, and the playback and lock screen sections of Player.
#import <UIKit/UIKit.h>
// Spotify ships its newer design behind several flags at once, so this switch owns them all:
diff --git a/tweak/Sources/Features/Onboarding/Tour.m b/tweak/Sources/Features/Onboarding/Tour.m
index b83dcb36..912be1cf 100644
--- a/tweak/Sources/Features/Onboarding/Tour.m
+++ b/tweak/Sources/Features/Onboarding/Tour.m
@@ -339,7 +339,7 @@ static SGTourRow *actionRow(NSString *symbol, NSString *title, NSString *subtitl
__weak typeof(self) weakSelf = self;
SGTourRow *glass = switchRow(@"drop.fill", @"Liquid Glass UI", @"Spotify's own glass bars and sheets, the search field, now playing bar, artwork background and lyrics", SGKeySpotifyGlass, NO);
glass.changed = ^(BOOL on) { SGSetLiquidGlassUI(on); };
- SGTourRow *premium = switchRow(@"crown.fill", @"Pretend to be Premium", @"Free accounts only", SGKeyFakePremium, NO);
+ SGTourRow *premium = switchRow(@"crown.fill", @"Spoof Premium", @"Free accounts only", SGKeyFakePremium, NO);
premium.warning = SGFakePremiumWarning;
NSMutableArray *pages = [NSMutableArray array];
_pages = pages;
@@ -354,10 +354,10 @@ static SGTourRow *actionRow(NSString *symbol, NSString *title, NSString *subtitl
switchRow(@"moon.fill", @"AMOLED background", @"Pure black instead of Spotify's dark grey", SGKeyAmoled, NO),
switchRow(@"paintpalette.fill", @"Home gradient", @"A wash of colour behind the top of Home", SGKeyHomeGradient, NO),
]]];
- [pages addObject:[self pageWithSymbol:@"eye.slash.fill" heading:@"Ads and privacy." body:@"The ad switches come from EeveeSpotify, off until switched on and not needed on a Premium account. Telemetry blocking is on from the start." rows:@[
+ [pages addObject:[self pageWithSymbol:@"eye.slash.fill" heading:@"Premium and ads." body:@"The ad switches come from EeveeSpotify, off until switched on and not needed on a Premium account. Telemetry blocking is on from the start." rows:@[
+ premium,
switchRow(@"speaker.slash.fill", @"Hide ads", @"Ad services never start, ad slots leave Home and Search", SGKeyHideAds, NO),
switchRow(@"hand.raised.fill", @"Hide upsells", @"Premium prompts, banners and sheets dropped", SGKeyHideUpsells, NO),
- premium,
switchRow(@"antenna.radiowaves.left.and.right.slash", @"Block telemetry", @"Analytics requests answered empty instead of let out", SGKeyBlockTelemetry, YES),
]]];
SGTourRow *lyricsOnly = switchRow(@"rectangle.compress.vertical", @"Only the lyrics", @"Hides every card under the player except lyrics: about the artist, videos, song DNA, credits, merch and the rest", SGKeyPlayerLyricsOnly, NO);
diff --git a/tweak/Sources/Features/Privacy/Privacy.h b/tweak/Sources/Features/Privacy/Privacy.h
index c1a9400f..0141998f 100644
--- a/tweak/Sources/Features/Privacy/Privacy.h
+++ b/tweak/Sources/Features/Privacy/Privacy.h
@@ -11,4 +11,4 @@ NSUInteger SGBlockedCount(NSString *label);
void SGResetBlocked(void);
@class SGModSection;
-NSArray<SGModSection *> *SGPrivacySections(void); // the telemetry rows of the Ads & privacy page
+NSArray<SGModSection *> *SGPrivacySections(void); // the telemetry rows of the Premium & ads page
diff --git a/tweak/Sources/Settings/SGModSettings.x b/tweak/Sources/Settings/SGModSettings.x
index 467ef64a..31d0fd2d 100644
--- a/tweak/Sources/Settings/SGModSettings.x
+++ b/tweak/Sources/Settings/SGModSettings.x
@@ -1,7 +1,7 @@
// Settings: a Mod Settings row at the end of Spotify's settings list opens the mod's own pages:
// Appearance (with the Navbar, the tab bar's own composition, under it), Home & Library, Playlist
// and Player, each sections of switches (the mod's own and a few of Spotify's remote-config
-// flags), Ads & privacy and Labs, All flags, a searchable list of every flag with an override per
+// flags), Premium & ads and Labs, All flags, a searchable list of every flag with an override per
// flag, and Mod, the build, its updates and links. The same row leads the side drawer's list
// (trees/test6.txt), above Your plan, so the page is a tap from Home. The tweaks read the switches
// when they run, so a change shows after Spotify restarts; the Navbar page is the exception and
@@ -49,7 +49,7 @@ static UIViewController *modSettingsPage(void) {
pageRow(@"Player", @"play.circle", ^UIViewController *{ return SGNowPlayingSettingsPage(); }),
]),
SGSection(nil, @[
- pageRow(@"Ads & privacy", @"shield", ^UIViewController *{ return SGAdsSettingsPage(); }),
+ pageRow(@"Premium & ads", @"crown", ^UIViewController *{ return SGAdsSettingsPage(); }),
pageRow(@"Labs", @"testtube.2", ^UIViewController *{ return SGLabsPage(); }),
]),
SGSection(nil, @[