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: Block telemetry leaves Spotify's own events alone, so Recents fills again

BartolomeoRusso99b0c147b8ca2
diff --git a/tweak/Sources/Shared/Privacy/Privacy.x b/tweak/Sources/Shared/Privacy/Privacy.x
index 2302c6ab..f977d31d 100644
--- a/tweak/Sources/Shared/Privacy/Privacy.x
+++ b/tweak/Sources/Shared/Privacy/Privacy.x
@@ -1,17 +1,19 @@
// Telemetry blocking: an NSURLProtocol that answers the analytics endpoints itself instead of
// letting them out, and keeps a count of what it stopped for the Privacy page.
//
-// Spotify sends its own events to spclient's /gabo-receiver-service/, and each SDK it carries has
-// somewhere of its own to send to: Firebase to app-measurement.com, the Facebook SDK to
-// graph.facebook.com/<id>/activities, then Branch, Comscore, Segment. Nothing on the list carries
-// playback, search, sign-in or deep links, which is why whole hosts are named where the host does
-// nothing else and a path is named where it does.
+// Each SDK Spotify carries has somewhere of its own to send to: Firebase to app-measurement.com, the
+// Facebook SDK to graph.facebook.com/<id>/activities, then Branch, Comscore, Segment. Nothing on the
+// list carries playback, search, sign-in or deep links, which is why whole hosts are named where the
+// host does nothing else and a path is named where it does.
+//
+// Spotify's own events, sent to spclient's /gabo-receiver-service/, are not on the list. They carry
+// the playback reports Recents is built from: with them answered empty a track played never turned up
+// in Recents, and it did with the block off (device 2026-09-21, issue #70).
//
// A protocol handed to +registerClass: is only consulted by NSURLConnection and the shared
// session, so both session configurations are given it as well: that is what the SDKs build their
// sessions from. What the core sends over its own sockets is out of reach either way, and the
-// counter is what tells the two apart -- Spotify events climbing in it means those events travel
-// over NSURLSession after all.
+// counters are what tell the two apart.
#import "Core/SGCore.h"
#import "Privacy.h"
@@ -19,7 +21,6 @@ typedef struct { const char *host, *path, *label; } SGBlockRule;
// host matched on the domain and its subdomains, path as a substring; no path means the whole host.
static const SGBlockRule kRules[] = {
- {"spotify.com", "/gabo-receiver-service/", "Spotify events"},
{"app-measurement.com", NULL, "Firebase"},
{"crashlytics.com", NULL, "Crashlytics"},
{"facebook.com", "/activities", "Facebook"},
@@ -46,6 +47,11 @@ static NSMutableDictionary<NSString *, NSNumber *> *sg_counts;
static NSMutableDictionary<NSString *, NSNumber *> *countsLocked(void) {
if (!sg_counts) {
sg_counts = [[NSUserDefaults.standardUserDefaults dictionaryForKey:kCounts] mutableCopy] ?: [NSMutableDictionary dictionary];
+ // A count of a source that is not blocked any more (Spotify events, once) would stay in the total.
+ NSArray<NSString *> *labels = SGBlockedLabels();
+ for (NSString *label in sg_counts.allKeys) {
+ if (![labels containsObject:label]) [sg_counts removeObjectForKey:label];
+ }
}
return sg_counts;
}
diff --git a/tweak/Sources/Shared/Privacy/PrivacySettings.m b/tweak/Sources/Shared/Privacy/PrivacySettings.m
index 45d504a1..cde7bf16 100644
--- a/tweak/Sources/Shared/Privacy/PrivacySettings.m
+++ b/tweak/Sources/Shared/Privacy/PrivacySettings.m
@@ -3,7 +3,7 @@
SGModSection *SGPrivacySection(void) {
return SGSection(@"Privacy", @[
- SGWithSymbol(SGSwitchRow(@"Block telemetry", @"Answer the analytics endpoints with an empty reply instead of letting the request out", SGKeyBlockTelemetry), @"antenna.radiowaves.left.and.right.slash"),
+ SGWithSymbol(SGSwitchRow(@"Block telemetry", @"Answer the analytics of the SDKs Spotify carries (Firebase, Crashlytics, Comscore...) with an empty reply instead of letting the request out. Spotify's own events go out, since Recents is built from them", SGKeyBlockTelemetry), @"antenna.radiowaves.left.and.right.slash"),
]);
}