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

chore: rename the fork to Vitrine and remove the upstream branding

My-Name-Is-Jeff49739ebe2382
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 3aa49cd2..00000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-ko_fi: darkksh
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index e97f199e..863a9a1b 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -13,7 +13,7 @@ body:
attributes:
label: Before you file
options:
- - label: I searched the [open and closed issues](https://github.com/skopevoj/spoti.pw/issues?q=is%3Aissue) and this isn't reported yet.
+ - label: I searched the open and closed issues and this isn't reported yet.
required: true
- label: I'm on the newest release (Mod Settings → Mod → Updates).
required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index e43f1a2d..3ba13e0c 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1 @@
blank_issues_enabled: false
-contact_links:
- - name: How to build and sign it
- url: https://github.com/skopevoj/spoti.pw#build-it
- about: Build, signing and bundle id questions are answered in the README.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 4c162466..2418f770 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -8,7 +8,7 @@ body:
attributes:
label: Before you file
options:
- - label: I searched the [open and closed issues](https://github.com/skopevoj/spoti.pw/issues?q=is%3Aissue) and this isn't requested yet.
+ - label: I searched the open and closed issues and this isn't requested yet.
required: true
- type: dropdown
id: look
diff --git a/AGENTS.md b/AGENTS.md
index 560e62e1..7c400656 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,4 +1,4 @@
-# spoti.pw
+# Vitrine
A Theos tweak (Objective-C + Logos) injected into the decrypted Spotify iOS app. The full guide is
`docs/tweaks.md`; read it before changing code.
diff --git a/README.md b/README.md
index 22cdd8b8..e101cdc8 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,4 @@
-<p align="center">
- <img src="docs/icon.png" width="96" alt="">
-</p>
-
-<h1 align="center">spoti.pw</h1>
+<h1 align="center">Vitrine</h1>
<p align="center">Spotify, in glass.</p>
@@ -15,10 +11,8 @@
</p>
<p align="center">
- <a href="https://spoti.pw">spoti.pw</a> ·
<a href="#build-it">Build it</a> ·
- <a href="docs/tweaks.md">Hack on it</a> ·
- <a href="https://ko-fi.com/darkksh">Support</a>
+ <a href="docs/tweaks.md">Hack on it</a>
</p>
<p align="center">
@@ -33,6 +27,9 @@
A no-jailbreak Theos tweak that rebuilds Spotify for iOS in Liquid Glass, injected into your own
decrypted IPA and signed with your own certificate.
+Vitrine is a fork of [spoti.pw](https://github.com/skopevoj/spoti.pw) by Vojtěch Škopek, taken from
+0.21.1 (commit `c790445`, 2026-09-23), the last version released under GPL-3.0, and modified since.
+
Built and tested on **Spotify 9.1.78** — use that version's IPA. The mod hooks Spotify's own classes,
which change between releases, so another version may build and then break.
@@ -49,8 +46,7 @@ in Settings → Mod Settings.
## Build it
No IPA is distributed. Bring a decrypted **Spotify 9.1.78** IPA; you get an unsigned
-`spoti.pw-<mod version>.ipa` to sign with SideStore, Feather or any certificate signer. Each
-[release](https://github.com/skopevoj/spoti.pw/releases) also carries the tweak's `.deb`.
+`vitrine-<mod version>.ipa` to sign with SideStore, Feather or any certificate signer.
### Build with GitHub Actions
@@ -68,7 +64,7 @@ alone builds too, but without the Live Activity. Then:
Put the decrypted `.ipa` in `ipa/`, then:
- make release # out/spoti.pw-<version>.ipa, ready to sign
+ make release # out/vitrine-<version>.ipa, ready to sign
make install # the same, signed with your certificate and pushed over USB
`make install` reads `SIGN_P12`, `SIGN_PROFILE` and `SIGN_P12_PASSWORD` from `.signing.env`; copy
@@ -85,24 +81,6 @@ SideStore and Sideloadly get this right on their own.
The app keeps Spotify's bundle id, so it installs over the real Spotify.
-## Support
-
-Free, and staying that way — no paid tier, no supporter-only builds. If it made your phone nicer
-to use, a coffee is a good way to say so.
-
-<a href="https://ko-fi.com/darkksh">
- <img src="https://img.shields.io/badge/Ko--fi-Buy_me_a_coffee-FF5E5B?style=for-the-badge&logo=kofi&logoColor=white" alt="Support on Ko-fi">
-</a>
-
-## Star history
-
-<a href="https://star-history.com/#skopevoj/spoti.pw&Date">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=skopevoj/spoti.pw&type=Date&theme=dark">
- <img src="https://api.star-history.com/svg?repos=skopevoj/spoti.pw&type=Date" alt="Star history chart">
- </picture>
-</a>
-
## Credits
[cyan](https://github.com/asdfzxcvbn/pyzule-rw) injects, [Theos](https://theos.dev) builds, and
diff --git a/docs/tweaks.md b/docs/tweaks.md
index 2e8fc3e2..48b7e13f 100644
--- a/docs/tweaks.md
+++ b/docs/tweaks.md
@@ -109,7 +109,7 @@ Shared:
in place (AudioEffects.x, SGDSPEngine.m). The buffers are in the unit's output format, the
hardware's, not the client format Spotify sets. The effects are the SGDSP*.m files, on Accelerate,
Apple's Reverb2 unit, libbs2b and EEL2 (vendor/audio). Settings apply as they change, on a queue of
- its own; the file effects read their files from Documents/spoti.pw/Audio effects
+ its own; the file effects read their files from Documents/Vitrine/Audio effects
(AudioEffectsFiles.m). Tested on the Mac against harness/audio-effects/, the hook in the simulator
against its sim/
Haptics/ Vibrations (Haptics.h lists its files): a tap of UIKit's feedback generators for the player's and the now
@@ -219,7 +219,7 @@ and Live Activity. The root page in `App/ModSettings.x` holds the Appearance car
## Make targets
- make build # out/spoti.pw-<version>.ipa with FLEX in it
+ make build # out/vitrine-<version>.ipa with FLEX in it
make release # the same without FLEX
make install # build without FLEX, sign with your certificate, install over USB
make install FLEX=1 # the same with FLEX, which is what make trees reads through
diff --git a/harness/donate/README.md b/harness/donate/README.md
deleted file mode 100644
index 5e6d1fdd..00000000
--- a/harness/donate/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Donate harness
-
-The donate sheet and the Ko-fi button over a stand-in Home, on the simulator. Only `Donate.m`, the
-page style and Core's glass are compiled.
-
- ./build.sh
- xcrun simctl install booted build/DonateHarness.app
- xcrun simctl launch booted com.vojta.donateharness sheet # or: tour
diff --git a/harness/donate/build.sh b/harness/donate/build.sh
deleted file mode 100755
index d3757e0c..00000000
--- a/harness/donate/build.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-# Builds the donate harness for the simulator: Donate.m and the page style, nothing of Spotify's.
-set -e
-SRC=$(cd "$(dirname "$0")/../../tweak/Sources" && pwd)
-OUT=$(dirname "$0")/build
-VERSION=${1:-0.18.0}
-rm -rf "$OUT"; mkdir -p "$OUT/DonateHarness.app"
-
-SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)
-xcrun -sdk iphonesimulator clang -target arm64-apple-ios26.0-simulator -fobjc-arc -g -O0 \
- -I"$SRC" -isysroot "$SDK" -Wno-deprecated-declarations -DSG_VERSION='"0.20.0"' \
- "$(dirname "$0")/main.m" "$SRC"/App/Donate/Donate.m \
- "$SRC"/Settings/*.m \
- "$SRC"/Core/SGLog.m "$SRC"/Core/SGPrefs.m "$SRC"/Core/SGViewTree.m "$SRC"/Core/SGGlass.m \
- "$SRC"/Core/SGBackdrop.m "$SRC"/Core/SGFlagForce.m "$SRC"/Core/SGUIMode.m \
- -framework UIKit -framework QuartzCore -framework CoreGraphics -framework CoreImage -framework Foundation -framework Symbols \
- -o "$OUT/DonateHarness.app/DonateHarness"
-
-cat > "$OUT/DonateHarness.app/Info.plist" <<'PLIST'
-<?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>CFBundleExecutable</key><string>DonateHarness</string>
-<key>CFBundleIdentifier</key><string>com.vojta.donateharness</string>
-<key>CFBundleName</key><string>DonateHarness</string>
-<key>CFBundleVersion</key><string>1</string>
-<key>CFBundleShortVersionString</key><string>1.0</string>
-<key>UIUserInterfaceStyle</key><string>Dark</string>
-<key>UILaunchScreen</key><dict/>
-<key>UIApplicationSceneManifest</key><dict>
- <key>UIApplicationSupportsMultipleScenes</key><false/>
-</dict>
-</dict></plist>
-PLIST
-echo "built $OUT/DonateHarness.app"
diff --git a/harness/donate/main.m b/harness/donate/main.m
deleted file mode 100644
index 72b8ba88..00000000
--- a/harness/donate/main.m
+++ /dev/null
@@ -1,57 +0,0 @@
-// The donate sheet and the Ko-fi button over a stand-in Home: `sheet` brings the sheet up a second in,
-// `tour` shows the button alone, as the welcome tour has it.
-#import <UIKit/UIKit.h>
-#import "App/Donate/Donate.h"
-
-BOOL SGOnboardingShowing(void) { return NO; }
-BOOL SGUpdateNoticeShown(void) { return NO; }
-
-@interface Delegate : UIResponder <UIApplicationDelegate>
-@property (nonatomic, strong) UIWindow *window;
-@end
-
-@implementation Delegate
-
-static UIViewController *home(void) {
- UIViewController *screen = [UIViewController new];
- screen.view.backgroundColor = UIColor.blackColor;
- NSArray *colors = @[UIColor.systemPinkColor, UIColor.systemTealColor, UIColor.systemOrangeColor, UIColor.systemIndigoColor, UIColor.systemGreenColor, UIColor.systemPurpleColor];
- CGFloat side = (402 - 16 * 3) / 2.0;
- for (NSInteger i = 0; i < 8; i++) {
- UIView *tile = [[UIView alloc] initWithFrame:CGRectMake(16 + (i % 2) * (side + 16), 90 + (i / 2) * (side + 16), side, side)];
- tile.backgroundColor = colors[i % colors.count];
- tile.layer.cornerRadius = 10;
- [screen.view addSubview:tile];
- }
- if ([NSProcessInfo.processInfo.arguments containsObject:@"tour"]) {
- UIView *dim = [[UIView alloc] initWithFrame:UIScreen.mainScreen.bounds];
- dim.backgroundColor = [UIColor colorWithWhite:0 alpha:0.85];
- [screen.view addSubview:dim];
- SGKofiButton *button = [[SGKofiButton alloc] initWithTitle:@"Buy a student a coffee" prominent:NO];
- button.translatesAutoresizingMaskIntoConstraints = NO;
- [screen.view addSubview:button];
- [NSLayoutConstraint activateConstraints:@[
- [button.centerXAnchor constraintEqualToAnchor:screen.view.centerXAnchor],
- [button.centerYAnchor constraintEqualToAnchor:screen.view.centerYAnchor],
- ]];
- }
- return screen;
-}
-
-- (BOOL)application:(UIApplication *)app didFinishLaunchingWithOptions:(NSDictionary *)options {
- self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
- self.window.rootViewController = home();
- self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;
- [self.window makeKeyAndVisible];
- if ([NSProcessInfo.processInfo.arguments containsObject:@"sheet"])
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ SGShowDonateSheet(); });
- return YES;
-}
-
-@end
-
-int main(int argc, char *argv[]) {
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass(Delegate.class));
- }
-}
diff --git a/release-please-config.json b/release-please-config.json
index f31c7f79..25db5461 100644
--- a/release-please-config.json
+++ b/release-please-config.json
@@ -4,7 +4,7 @@
"packages": {
".": {
"release-type": "simple",
- "package-name": "spoti.pw",
+ "package-name": "vitrine",
"include-component-in-tag": false,
"bump-minor-pre-major": true,
"changelog-sections": [
diff --git a/scripts/install.sh b/scripts/install.sh
index 91823a23..017e2966 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Signs an IPA with your own certificate and installs it on the iPhone plugged into this Mac.
#
-# scripts/install.sh out/spoti.pw-0.20.0.ipa
+# scripts/install.sh out/vitrine-0.20.0.ipa
#
# Put the certificate details in .signing.env (gitignored):
# SIGN_P12=/path/to/cert.p12
diff --git a/scripts/pipeline.sh b/scripts/pipeline.sh
index 0300ad83..d31af954 100755
--- a/scripts/pipeline.sh
+++ b/scripts/pipeline.sh
@@ -63,8 +63,8 @@ rm -f "$ROOT/out/.info.plist"
# a fork left behind by a release is named for the version it really is.
MOD_VERSION="$(cat "$ROOT/version.txt" 2>/dev/null || true)"
: "${MOD_VERSION:=0.0.0}"
-OUT="${OUT:-$ROOT/out/spoti.pw-$MOD_VERSION.ipa}"
-echo "==> spoti.pw $MOD_VERSION on Spotify $SPOTIFY_VERSION -> $OUT"
+OUT="${OUT:-$ROOT/out/vitrine-$MOD_VERSION.ipa}"
+echo "==> Vitrine $MOD_VERSION on Spotify $SPOTIFY_VERSION -> $OUT"
# The flag table is generated rather than committed, so it always matches the IPA being built.
if [ ! -f "$ROOT/tweak/Sources/Shared/Flags/SGFlagList.m" ]; then
diff --git a/tweak/Sources/App/About/About.h b/tweak/Sources/App/About/About.h
index 54e07155..ae5c657c 100644
--- a/tweak/Sources/App/About/About.h
+++ b/tweak/Sources/App/About/About.h
@@ -6,7 +6,7 @@
#import <UIKit/UIKit.h>
#import "Settings/SGModPage.h"
-extern NSString *const SGUpdateURL; // spoti.pw's; the site and the repo are in Settings/SGPageStyle.h
+extern NSString *const SGUpdateURL; // nil turns the check off; the repo is in Settings/SGPageStyle.h
extern NSString *const SGUpdateCheckedNotification; // on the main thread, after a check ends either way
// One line of a release's changelog: what changed, under the heading Release Please put it under,
@@ -34,25 +34,16 @@ void SGCheckForUpdate(BOOL force);
UIViewController *SGUpdatePage(void); // UpdatePage.m: the state and the changelog
UIViewController *SGLicensesPage(void); // Licenses.m: the mod's license and the third-party ones it ships
-// Usage.m: the body the check posts to spoti.pw, nil while the switch is off. The key sits outside
-// "spotifyglass." so that Reset all settings neither switches the count off nor undoes an opt-out.
-#define SGKeyUsage @"spotipw.usage"
-NSData *SGUsageBody(void);
-BOOL SGUsageOwed(void); // on, and not yet sent this UTC day
-void SGUsageNoteAsked(void);
-
// UpdateNotice.m: the sheet a release newer than this build brings on its own, a few seconds after
// Spotify comes up, once per release. Watched from the settings %ctor; the switch is on the Updates
// page and takes effect at once.
#define SGKeyUpdateNotice @"spotifyglass.update.notice"
void SGWatchForUpdates(void);
-BOOL SGUpdateNoticeShown(void); // this run, so the donate sheet stays out of its way
// Whether the now playing card on the lock screen can open this build. It depends on the signature,
// not on the mod: iOS launches by the App ID of the application-identifier entitlement, so a build
// whose bundle id is not that App ID cannot be opened from the card. Signing.m says so once.
-extern NSString *const SGSigningHelpURL;
NSString *SGSigningAppIdentifier(void); // App ID without the team prefix, nil if unreadable
BOOL SGSigningOpensFromLockScreen(void); // YES when unreadable, so a build that works stays quiet
SGModRow *SGSigningWarningRow(void); // nil while the signature is sound
diff --git a/tweak/Sources/App/About/AboutSettings.m b/tweak/Sources/App/About/AboutSettings.m
index a21bd733..7b560867 100644
--- a/tweak/Sources/App/About/AboutSettings.m
+++ b/tweak/Sources/App/About/AboutSettings.m
@@ -41,18 +41,19 @@ UIViewController *SGAboutPage(void) {
// The row reads out where the build stands and opens the changelog of everything newer than it.
SGModRow *updates = SGPageRow(@"Updates", ^UIViewController *{ return SGUpdatePage(); });
updates.value = ^NSString *{ return SGUpdateStatus(); };
+ NSMutableArray<SGModRow *> *links = [NSMutableArray array];
+ if (SGRepoURL) [links addObject:withSymbol(SGLinkRow(@"GitHub", nil, SGRepoURL), @"chevron.left.forwardslash.chevron.right")];
+ [links addObjectsFromArray:@[
+ withSymbol(SGPageRow(@"Licenses", ^UIViewController *{ return SGLicensesPage(); }), @"doc.text"),
+ withSymbol(SGActionRow(@"Welcome tour", nil, ^{ SGShowOnboarding(); }), @"map"),
+ ]];
return [[SGModPage alloc] initWithTitle:@"Mod" intro:nil sections:@[
SGSection(nil, @[
updates,
SGStatRow(@"Version", ^NSString *{ return @(SG_VERSION); }),
SGStatRow(@"Spotify", ^NSString *{ return spotify; }),
]),
- SGSection(nil, @[
- withSymbol(SGLinkRow(@"Website", nil, SGSiteURL), @"safari"),
- withSymbol(SGLinkRow(@"GitHub", nil, SGRepoURL), @"chevron.left.forwardslash.chevron.right"),
- withSymbol(SGPageRow(@"Licenses", ^UIViewController *{ return SGLicensesPage(); }), @"doc.text"),
- withSymbol(SGActionRow(@"Welcome tour", nil, ^{ SGShowOnboarding(); }), @"map"),
- ]),
+ SGSection(nil, links),
SGSection(nil, @[
withSymbol(SGActionRow(@"Export settings", nil, ^{ SGExportSettings(); }), @"square.and.arrow.up"),
withSymbol(SGActionRow(@"Import settings", nil, ^{ SGImportSettings(); }), @"square.and.arrow.down"),
diff --git a/tweak/Sources/App/About/Licenses.m b/tweak/Sources/App/About/Licenses.m
index f206aa3d..781fc87f 100644
--- a/tweak/Sources/App/About/Licenses.m
+++ b/tweak/Sources/App/About/Licenses.m
@@ -30,7 +30,7 @@ static NSString *const kZlib =
@"3. This notice may not be removed or altered from any source distribution.";
UIViewController *SGLicensesPage(void) {
- SGModRow *mod = SGLinkRow(@"spoti.pw", @"PolyForm Strict License 1.0.0", [SGRepoURL stringByAppendingString:@"/blob/main/LICENSE"]);
+ SGModRow *mod = SGLinkRow(@"Vitrine", @"GNU General Public License v3.0", @"https://www.gnu.org/licenses/gpl-3.0.html");
SGModRow *bs2b = SGLinkRow(@"libbs2b", @"Crossfeed · MIT License", @"https://github.com/alexmarsev/libbs2b");
SGModRow *wdl = SGLinkRow(@"WDL", @"Liveprog's EEL2 · zlib License", @"https://github.com/justinfrankel/WDL");
return [[SGModPage alloc] initWithTitle:@"Licenses" intro:@"The mod's own license, and the code from others it includes." sections:@[
diff --git a/tweak/Sources/App/About/Signing.m b/tweak/Sources/App/About/Signing.m
index 0e09257c..30eb7eba 100644
--- a/tweak/Sources/App/About/Signing.m
+++ b/tweak/Sources/App/About/Signing.m
@@ -12,7 +12,6 @@
#import "App/Onboarding/Onboarding.h"
#import <dlfcn.h>
-NSString *const SGSigningHelpURL = @"https://github.com/skopevoj/spoti.pw#signing-it-yourself";
static NSString *const kWarned = @"spotifyglass.signing.warned";
static BOOL sg_fixPending;
@@ -70,8 +69,8 @@ static void showFix(void) {
[sheet addAction:[UIAlertAction actionWithTitle:@"Copy the bundle id" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
UIPasteboard.generalPasteboard.string = appID;
}]];
- [sheet addAction:[UIAlertAction actionWithTitle:@"Read more" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
- SGOpenURL(SGSigningHelpURL);
+ if (SGRepoURL) [sheet addAction:[UIAlertAction actionWithTitle:@"Read more" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+ SGOpenURL([SGRepoURL stringByAppendingString:@"#signing-it-yourself"]);
}]];
[sheet addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]];
[top presentViewController:sheet animated:YES completion:nil];
diff --git a/tweak/Sources/App/About/Update.m b/tweak/Sources/App/About/Update.m
index a0701f7a..087289cd 100644
--- a/tweak/Sources/App/About/Update.m
+++ b/tweak/Sources/App/About/Update.m
@@ -4,13 +4,13 @@
// commit, each ending in a link to it. One request brings the last twenty releases rather than only
// the newest, which is what lets the Updates page show every version between this build and the
// newest one. Asked a few seconds after Spotify comes up (UpdateNotice.m) and when Mod Settings
-// opens, at most once every six hours either way, and on demand from the page. spoti.pw is asked
-// first and hands on GitHub's list; the request carries Usage.m's body. GitHub itself is the fallback.
+// opens, at most once every six hours either way, and on demand from the page. Off while
+// SGUpdateURL is nil.
#import "Core/SGCore.h"
#import "About.h"
-NSString *const SGUpdateURL = @"https://spoti.pw/api/update";
-static NSString *const kGitHubURL = @"https://api.github.com/repos/skopevoj/spoti.pw/releases?per_page=20";
+// The fork's GitHub releases, e.g. https://api.github.com/repos/<owner>/<repo>/releases?per_page=20
+NSString *const SGUpdateURL = nil;
NSString *const SGUpdateCheckedNotification = @"spotifyglass.update.checked.notification";
static NSString *const kChecked = @"spotifyglass.update.checked";
@@ -143,6 +143,7 @@ NSString *SGUpdateVersion(void) {
// What the Updates row shows on the right; the page's own ticker reads it while the page is open,
// so the async check lands in the cell without anything having to be told about it.
NSString *SGUpdateStatus(void) {
+ if (!SGUpdateURL) return @"off";
if (sg_running) return @"checking…";
if (sg_failure) return sg_failure;
NSString *latest = SGUpdateVersion();
@@ -203,10 +204,8 @@ static void ask(NSString *url, NSData *body, void (^done)(NSArray<NSDictionary *
void SGCheckForUpdate(BOOL force) {
NSUserDefaults *store = NSUserDefaults.standardUserDefaults;
NSTimeInterval last = [store doubleForKey:kChecked];
- if (sg_running) return;
- // The day's count goes out with the first check of the day, whatever the six hours say.
- BOOL owed = SGUsageOwed();
- if (!force && !owed && last > 0 && NSDate.date.timeIntervalSince1970 - last < kInterval) return;
+ if (!SGUpdateURL || sg_running) return;
+ if (!force && last > 0 && NSDate.date.timeIntervalSince1970 - last < kInterval) return;
sg_running = YES;
sg_failure = nil;
@@ -227,12 +226,5 @@ void SGCheckForUpdate(BOOL force) {
[NSNotificationCenter.defaultCenter postNotificationName:SGUpdateCheckedNotification object:nil];
});
};
- NSData *body = SGUsageBody();
- if (body) SGUsageNoteAsked();
- SGLog(@"update check: asking spoti.pw %@", body ? @"with the usage body" : @"without the usage body");
- ask(SGUpdateURL, body, ^(NSArray<NSDictionary *> *releases, NSInteger status, NSError *error) {
- if (releases) return finish(releases, status, error);
- SGLog(@"update check: spoti.pw answered HTTP %ld, asking GitHub", (long)status);
- ask(kGitHubURL, nil, finish);
- });
+ ask(SGUpdateURL, nil, finish);
}
diff --git a/tweak/Sources/App/About/UpdateNotice.m b/tweak/Sources/App/About/UpdateNotice.m
index ed502d09..8d37a8e2 100644
--- a/tweak/Sources/App/About/UpdateNotice.m
+++ b/tweak/Sources/App/About/UpdateNotice.m
@@ -15,10 +15,6 @@ static const NSInteger kTries = 15; // a minute of waiting for the screen
static BOOL sg_offered; // once a run, whatever else happens
-BOOL SGUpdateNoticeShown(void) {
- return sg_offered;
-}
-
// Everything that has changed since this build, newest release first, which is what the sheet counts
// and reads the first lines of.
static NSArray<SGUpdateChange *> *changesSinceThisBuild(void) {
@@ -83,23 +79,16 @@ static void offerWhenClear(NSInteger tries) {
}
void SGWatchForUpdates(void) {
- // TEMPORARY, remove before committing: forgets which release this phone has been told about, so the
- // sheet is offered again for one it has already had (0.20.0 was marked told on 2026-09-20 by a
- // manual Check now, which is what let the sheet through in the first place).
- [NSUserDefaults.standardUserDefaults removeObjectForKey:kTold];
- // Every time Spotify comes to the front, not only the first: it lives for days behind other apps,
- // and the day's usage count has to go out on a day it was merely brought back. The sheet is still
- // once per launch.
+ // Once per launch, a few seconds after Spotify first comes to the front.
static BOOL launched;
[NSNotificationCenter.defaultCenter addObserverForName:UIApplicationDidBecomeActiveNotification
object:nil
queue:NSOperationQueue.mainQueue
usingBlock:^(NSNotification *note) {
- BOOL first = !launched;
+ if (launched) return;
launched = YES;
- if (!first && !SGUsageOwed()) return;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kSettle * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- BOOL tell = first && SGEnabled(SGKeyUpdateNotice);
+ BOOL tell = SGEnabled(SGKeyUpdateNotice);
if (tell && SGUpdateVersion()) { // the last check knows one already
offerWhenClear(kTries);
} else if (tell) {
@@ -112,9 +101,8 @@ void SGWatchForUpdates(void) {
}];
}
// Inside the six hours this does nothing and no check lands, which is the point: the
- // sheet is for a release that turned up, not for every launch. The day's usage count is
- // the exception, and it goes out whether or not the sheet is wanted.
- if (tell || SGUsageOwed()) SGCheckForUpdate(NO);
+ // sheet is for a release that turned up, not for every launch.
+ if (tell) SGCheckForUpdate(NO);
});
}];
}
diff --git a/tweak/Sources/App/About/UpdatePage.m b/tweak/Sources/App/About/UpdatePage.m
index 7db8f0f8..17a380e5 100644
--- a/tweak/Sources/App/About/UpdatePage.m
+++ b/tweak/Sources/App/About/UpdatePage.m
@@ -135,7 +135,7 @@ static NSArray<SGUpdateRelease *> *releasesToShow(void) {
if (SGUpdateVersion() && newest.url.length)
[top addObject:linkRow([@"Get " stringByAppendingString:newest.version],
@"The release on GitHub, where its .deb is", @"arrow.down.circle", newest.url)];
- [top addObject:linkRow(@"All releases", @"Every version, this one and the ones before it",
+ if (SGRepoURL) [top addObject:linkRow(@"All releases", @"Every version, this one and the ones before it",
@"clock.arrow.circlepath", [SGRepoURL stringByAppendingString:@"/releases"])];
[groups addObject:group(nil, top)];
diff --git a/tweak/Sources/App/About/Usage.m b/tweak/Sources/App/About/Usage.m
deleted file mode 100644
index 6ea438fc..00000000
--- a/tweak/Sources/App/About/Usage.m
+++ /dev/null
@@ -1,101 +0,0 @@
-// What the update check tells spoti.pw about this install, so installs can be counted: versions,
-// device, look, and which big switches are on. Nothing of the account or of what is played.
-#import <dlfcn.h>
-#import <sys/utsname.h>
-#import "Core/SGCore.h"
-#import "About.h"
-#import "Native/Appearance/Appearance.h"
-#import "Native/Player/NowPlaying.h"
-#import "Shared/ArtistBlock/ArtistBlock.h"
-#import "Shared/Gestures/Gestures.h"
-#import "Shared/Haptics/Haptics.h"
-#import "Shared/AudioEffects/AudioEffects.h"
-#import "Shared/LiveActivity/LiveActivity.h"
-#import "Shared/LockScreenLyrics/LockScreenLyrics.h"
-#import "Shared/LyricsSources/LyricsSources.h"
-#import "Shared/Privacy/Privacy.h"
-
-// Outside "spotifyglass." on purpose: Reset all settings must not mint a second install, and a
-// settings backup restored on another phone must not carry this one's id along.
-static NSString *const kInstall = @"spotipw.install";
-static NSString *const kAsked = @"spotipw.asked";
-
-// Not SGEnabled: after a reset that reads every unset switch as off, and this is not one of them.
-static BOOL usageOn(void) {
- id stored = [NSUserDefaults.standardUserDefaults objectForKey:SGKeyUsage];
- return stored ? [stored boolValue] : YES;
-}
-
-// Asked on every return to the front, so the formatter is made once.
-static NSString *today(void) {
- static NSDateFormatter *format;
- static dispatch_once_t once;
- dispatch_once(&once, ^{
- format = [NSDateFormatter new];
- format.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
- format.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
- format.dateFormat = @"yyyy-MM-dd";
- });
- return [format stringFromDate:NSDate.date];
-}
-
-BOOL SGUsageOwed(void) {
- return usageOn() && ![[NSUserDefaults.standardUserDefaults stringForKey:kAsked] isEqualToString:today()];
-}
-
-// Marked when asked, not when answered: a day spoti.pw is down costs that day's count, not a request
-// on every launch.
-void SGUsageNoteAsked(void) {
- [NSUserDefaults.standardUserDefaults setObject:today() forKey:kAsked];
-}
-
-static NSString *installID(void) {
- NSUserDefaults *store = NSUserDefaults.standardUserDefaults;
- NSString *stored = [store stringForKey:kInstall];
- if ([[NSUUID alloc] initWithUUIDString:stored ?: @""]) return stored;
- NSString *made = NSUUID.UUID.UUIDString.lowercaseString;
- [store setObject:made forKey:kInstall];
- return made;
-}
-
-static NSString *device(void) {
- struct utsname name;
- return uname(&name) == 0 ? @(name.machine) : nil;
-}
-
-// A dylib inside the app's bundle was put into the IPA; one outside it was injected by a jailbreak.
-static NSString *installKind(void) {
- NSString *bundle = NSBundle.mainBundle.bundlePath;
- Dl_info info;
- if (dladdr(&installKind, &info) && info.dli_fname && ![@(info.dli_fname) hasPrefix:bundle]) return @"jailbreak";
- NSString *marker = [bundle.stringByDeletingLastPathComponent stringByAppendingPathComponent:@"_TrollStore"];
- return [NSFileManager.defaultManager fileExistsAtPath:marker] ? @"trollstore" : @"sideload";
-}
-
-NSData *SGUsageBody(void) {
- if (!usageOn()) return nil;
- NSMutableDictionary *body = [NSMutableDictionary dictionary];
- body[@"id"] = installID();
- body[@"mod"] = @SG_VERSION;
- body[@"spotify"] = NSBundle.mainBundle.infoDictionary[@"CFBundleShortVersionString"];
- body[@"ios"] = UIDevice.currentDevice.systemVersion;
- body[@"device"] = device();
- body[@"ui"] = SGRedesignedUI() ? @"redesigned" : @"native";
- body[@"kind"] = installKind();
- body[@"lang"] = NSLocale.currentLocale.languageCode;
- body[@"region"] = NSLocale.currentLocale.countryCode;
- body[@"features"] = @{
- @"dsp": @(SGHidden(SGKeyDSP)),
- @"liveActivity": @(SGFlag(SGKeyLiveActivity, NO)),
- @"lockScreenLyrics": @(SGFlag(SGKeyLockScreenLyrics, NO)),
- @"musicHaptics": @(SGFlag(SGKeyMusicHaptics, NO)),
- @"controlHaptics": @(SGEnabled(SGKeyControlHaptics)),
- @"artistBlock": @(SGFlag(SGKeyArtistBlock, NO)),
- @"gestures": @(SGFlag(SGKeyGestures, NO)),
- @"blockTelemetry": @(SGEnabled(SGKeyBlockTelemetry)),
- @"lyricsCard": @(SGFlag(SGKeyLyricsCard, NO)),
- @"amoled": @(SGFlag(SGKeyAmoled, NO)),
- };
- body[@"lyrics"] = SGLyricsOrder();
- return [NSJSONSerialization dataWithJSONObject:body options:0 error:NULL];
-}
diff --git a/tweak/Sources/App/Donate/Donate.h b/tweak/Sources/App/Donate/Donate.h
deleted file mode 100644
index b6f3c12b..00000000
--- a/tweak/Sources/App/Donate/Donate.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Donate: Ko-fi, asked for from the Mod Settings row, a sheet after the first welcome tour (after its
-// restart when the look changed), then two days on and every fourteen after that.
-#import <UIKit/UIKit.h>
-#import "Settings/SGModPage.h"
-
-extern NSString *const SGKofiURL;
-UIColor *SGKofiColor(void);
-
-// A glass capsule with a Ko-fi rim circling it and a breathing glow. Prominent tints the glass itself.
-@interface SGKofiButton : UIControl
-- (instancetype)initWithTitle:(NSString *)title prominent:(BOOL)prominent;
-@end
-
-void SGShowDonateSheet(void);
-SGModRow *SGDonateRow(void);
-void SGWatchForDonate(void);
-// A tour is done: the sheet follows it, or follows Home after the restart.
-void SGDonateAfterTour(BOOL restarting);
-BOOL SGDonateAfterTourPending(void);
-void SGOfferDonate(void);
diff --git a/tweak/Sources/App/Donate/Donate.m b/tweak/Sources/App/Donate/Donate.m
deleted file mode 100644
index 99aaef58..00000000
--- a/tweak/Sources/App/Donate/Donate.m
+++ /dev/null
@@ -1,519 +0,0 @@
-#import "Core/SGCore.h"
-#import "Settings/SGPageStyle.h"
-#import "App/About/About.h"
-#import "App/Onboarding/Onboarding.h"
-#import "Donate.h"
-
-NSString *const SGKofiURL = @"https://ko-fi.com/darkksh";
-
-// Outside the "spotifyglass." prefix, so Reset all settings does not bring the sheet back early.
-static NSString *const kNextKey = @"spotipw.donate.next";
-static NSString *const kAfterTourKey = @"spotipw.donate.aftertour";
-static const NSTimeInterval kDay = 86400;
-static const NSTimeInterval kFirstAsk = 2 * kDay, kEvery = 14 * kDay, kAfterDonating = 90 * kDay;
-static const NSTimeInterval kSettle = 20, kRetry = 5;
-static const NSInteger kTries = 24;
-
-static UIColor *rgb(uint32_t v, CGFloat alpha) {
- return [UIColor colorWithRed:((v >> 16) & 0xFF) / 255.0 green:((v >> 8) & 0xFF) / 255.0 blue:(v & 0xFF) / 255.0 alpha:alpha];
-}
-
-UIColor *SGKofiColor(void) { return rgb(0xFF5E5B, 1); }
-
-#pragma mark - button
-
-static const CGFloat kRimWidth = 1.5, kGlowWidth = 6, kGlowRadius = 9, kGlowBleed = 22;
-static const CFTimeInterval kTurn = 3.2, kBreath = 1.8;
-
-@interface CAFilter : NSObject
-+ (instancetype)filterWithType:(NSString *)type;
-@end
-
-// Ko-fi red most of the way round, with one bright streak that runs along the rim as the colours turn.
-static CAGradientLayer *newRimColors(void) {
- CAGradientLayer *gradient = [CAGradientLayer layer];
- gradient.type = kCAGradientLayerConic;
- gradient.startPoint = CGPointMake(0.5, 0.5);
- gradient.endPoint = CGPointMake(0.5, 0);
- gradient.colors = @[(id)rgb(0xFF5E5B, 0.55).CGColor, (id)rgb(0xFF5E5B, 1).CGColor, (id)rgb(0xFFB4A2, 1).CGColor,
- (id)UIColor.whiteColor.CGColor, (id)rgb(0xFFB4A2, 1).CGColor, (id)rgb(0xFF5E5B, 1).CGColor,
- (id)rgb(0xFF5E5B, 0.55).CGColor];
- gradient.locations = @[@0, @0.5, @0.64, @0.72, @0.8, @0.9, @1];
- return gradient;
-}
-
-static CAShapeLayer *newStroke(CGFloat width) {
- CAShapeLayer *stroke = [CAShapeLayer layer];
- stroke.fillColor = UIColor.clearColor.CGColor;
- stroke.strokeColor = UIColor.blackColor.CGColor;
- stroke.lineWidth = width;
- return stroke;
-}
-
-@implementation SGKofiButton {
- BOOL _prominent;
- UIVisualEffectView *_glass;
- CAGradientLayer *_fill;
- CALayer *_rim, *_glow, *_glowShape;
- CAShapeLayer *_rimMask, *_glowMask;
- CAGradientLayer *_rimColors, *_glowColors;
- UIImpactFeedbackGenerator *_haptic;
-}
-
-- (instancetype)initWithTitle:(NSString *)title prominent:(BOOL)prominent {
- if (!(self = [super initWithFrame:CGRectZero])) return nil;
- _prominent = prominent;
- self.isAccessibilityElement = YES;
- self.accessibilityTraits = UIAccessibilityTraitButton;
- self.accessibilityLabel = title;
-
- _glow = [CALayer layer];
- _glowShape = [CALayer layer];
- _glowMask = newStroke(kGlowWidth);
- _glowShape.mask = _glowMask;
- _glowColors = newRimColors();
- [_glowShape addSublayer:_glowColors];
- [_glow addSublayer:_glowShape];
- Class filter = NSClassFromString(@"CAFilter");
- CAFilter *blur = [filter respondsToSelector:@selector(filterWithType:)] ? [filter filterWithType:@"gaussianBlur"] : nil;
- if (blur) {
- [blur setValue:@(kGlowRadius) forKey:@"inputRadius"];
- _glow.filters = @[blur];
- }
- [self.layer addSublayer:_glow];
-
- UIVisualEffect *effect = SGGlassEffect();
- BOOL glass = NSClassFromString(@"UIGlassEffect") && [effect respondsToSelector:@selector(setTintColor:)];
- if (glass && prominent) {
- effect = [NSClassFromString(@"UIGlassEffect") effectWithStyle:0];
- [(id)effect setTintColor:rgb(0xFF5E5B, 0.85)];
- }
- _glass = [[UIVisualEffectView alloc] initWithEffect:effect];
- _glass.userInteractionEnabled = NO;
- _glass.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;
- [self addSubview:_glass];
- if (prominent && !glass) {
- _fill = [CAGradientLayer layer];
- _fill.colors = @[(id)rgb(0xFF7A73, 1).CGColor, (id)rgb(0xE8434B, 1).CGColor];
- _fill.startPoint = CGPointMake(0, 0);
- _fill.endPoint = CGPointMake(1, 1);
- [self.layer addSublayer:_fill];
- }
-
- _rim = [CALayer layer];
- _rimMask = newStroke(kRimWidth);
- _rim.mask = _rimMask;
- _rimColors = newRimColors();
- [_rim addSublayer:_rimColors];
- [self.layer addSublayer:_rim];
-
- UIImageView *cup = SGSymbolView(@"cup.and.saucer.fill", 17, UIImageSymbolWeightSemibold, 24);
- cup.tintColor = prominent ? UIColor.whiteColor : SGKofiColor();
- UILabel *label = [UILabel new];
- label.text = title;
- label.font = [UIFont systemFontOfSize:17 weight:UIFontWeightSemibold];
- label.textColor = UIColor.whiteColor;
- label.adjustsFontSizeToFitWidth = YES;
- label.minimumScaleFactor = 0.8;
- UIStackView *content = [[UIStackView alloc] initWithArrangedSubviews:@[cup, label]];
- content.alignment = UIStackViewAlignmentCenter;
- content.spacing = 8;
- content.userInteractionEnabled = NO;
- content.translatesAutoresizingMaskIntoConstraints = NO;
- [self addSubview:content];
- [NSLayoutConstraint activateConstraints:@[
- [content.centerXAnchor constraintEqualToAnchor:self.centerXAnchor],
- [content.leadingAnchor constraintGreaterThanOrEqualToAnchor:self.leadingAnchor constant:22],
- [content.topAnchor constraintEqualToAnchor:self.topAnchor constant:prominent ? 16 : 13],
- [content.bottomAnchor constraintEqualToAnchor:self.bottomAnchor constant:prominent ? -16 : -13],
- ]];
- // Hugs its content unless its host stretches it.
- NSLayoutConstraint *hug = [content.leadingAnchor constraintEqualToAnchor:self.leadingAnchor constant:22];
- hug.priority = UILayoutPriorityDefaultLow;
- hug.active = YES;
-
- _haptic = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium];
- [self addTarget:self action:@selector(tapped) forControlEvents:UIControlEventTouchUpInside];
- return self;
-}
-
-- (void)tapped {
- [_haptic impactOccurred];
-}
-
-- (void)layoutSubviews {
- [super layoutSubviews];
- CGRect bounds = self.bounds;
- CGFloat radius = bounds.size.height / 2;
- _glass.frame = bounds;
- SGShapeGlass(_glass, radius, YES);
- UIBezierPath *capsule = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(bounds, kRimWidth / 2, kRimWidth / 2) cornerRadius:radius];
- CGFloat side = ceil(hypot(bounds.size.width, bounds.size.height)) + 2;
- CGRect square = CGRectMake(CGRectGetMidX(bounds) - side / 2, CGRectGetMidY(bounds) - side / 2, side, side);
-
- [CATransaction begin];
- [CATransaction setDisableActions:YES];
- _fill.frame = bounds;
- _fill.cornerRadius = radius;
- _rim.frame = bounds;
- _rimMask.frame = bounds;
- _rimMask.path = capsule.CGPath;
- _rimColors.frame = square;
- _glow.frame = CGRectInset(bounds, -kGlowBleed, -kGlowBleed);
- _glowShape.frame = _glow.bounds;
- _glowMask.frame = _glow.bounds;
- UIBezierPath *glowPath = [capsule copy];
- [glowPath applyTransform:CGAffineTransformMakeTranslation(kGlowBleed, kGlowBleed)];
- _glowMask.path = glowPath.CGPath;
- _glowColors.frame = CGRectOffset(square, kGlowBleed, kGlowBleed);
- [CATransaction commit];
-}
-
-- (void)setHighlighted:(BOOL)highlighted {
- BOOL changed = highlighted != self.highlighted;
- [super setHighlighted:highlighted];
- if (!changed) return;
- [UIView animateWithDuration:highlighted ? 0.18 : 0.45 delay:0 usingSpringWithDamping:highlighted ? 1 : 0.55
- initialSpringVelocity:0 options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState animations:^{
- self.transform = highlighted ? CGAffineTransformMakeScale(0.95, 0.95) : CGAffineTransformIdentity;
- } completion:nil];
-}
-
-- (void)updateMotion {
- _glow.hidden = UIAccessibilityIsReduceTransparencyEnabled();
- BOOL moving = self.window && !UIAccessibilityIsReduceMotionEnabled();
- for (CAGradientLayer *colors in @[_rimColors, _glowColors]) {
- if (!moving) {
- [colors removeAllAnimations];
- continue;
- }
- if ([colors animationForKey:@"turn"]) continue;
- CABasicAnimation *turn = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
- turn.fromValue = @0;
- turn.toValue = @(M_PI * 2);
- turn.duration = kTurn;
- turn.repeatCount = HUGE_VALF;
- [colors addAnimation:turn forKey:@"turn"];
- }
- if (!moving) {
- [_glow removeAllAnimations];
- _glow.opacity = _prominent ? 0.8 : 0.6;
- return;
- }
- if ([_glow animationForKey:@"breathe"]) return;
- CABasicAnimation *breathe = [CABasicAnimation animationWithKeyPath:@"opacity"];
- breathe.fromValue = @(_prominent ? 0.55 : 0.35);
- breathe.toValue = @1;
- breathe.duration = kBreath;
- breathe.autoreverses = YES;
- breathe.repeatCount = HUGE_VALF;
- breathe.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
- [_glow addAnimation:breathe forKey:@"breathe"];
-}
-
-// Backgrounding drops layer animations; they start again on the way back.
-- (void)didMoveToWindow {
- [super didMoveToWindow];
- [NSNotificationCenter.defaultCenter removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil];
- if (self.window) [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateMotion) name:UIApplicationWillEnterForegroundNotification object:nil];
- [self updateMotion];
-}
-
-@end
-
-#pragma mark - schedule
-
-static NSTimeInterval now(void) {
- return NSDate.date.timeIntervalSince1970;
-}
-
-static NSTimeInterval nextAsk(void) {
- NSUserDefaults *store = NSUserDefaults.standardUserDefaults;
- double next = [store doubleForKey:kNextKey];
- if (next <= 0) {
- next = now() + kFirstAsk;
- [store setDouble:next forKey:kNextKey];
- }
- return next;
-}
-
-static void askAgainIn(NSTimeInterval wait) {
- [NSUserDefaults.standardUserDefaults setDouble:now() + wait forKey:kNextKey];
-}
-
-BOOL SGDonateAfterTourPending(void) {
- return [NSUserDefaults.standardUserDefaults boolForKey:kAfterTourKey];
-}
-
-#pragma mark - sheet
-
-static const CGFloat kCardMargin = 10, kCardPadding = 26;
-
-@interface SGDonateController : UIViewController
-@end
-
-@implementation SGDonateController {
- UIView *_backdrop, *_card;
- CAGradientLayer *_warmth;
- UIImageView *_cup, *_heart;
- BOOL _leaving;
-}
-
-static char kCardGlassKey;
-
-- (instancetype)init {
- if (!(self = [super initWithNibName:nil bundle:nil])) return nil;
- self.modalPresentationStyle = UIModalPresentationOverFullScreen;
- self.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;
- return self;
-}
-
-- (CGFloat)cardRadius {
- if (@available(iOS 26.0, *)) return 44;
- return 28;
-}
-
-- (UILabel *)label:(NSString *)text font:(UIFont *)font color:(UIColor *)color {
- UILabel *label = [UILabel new];
- label.text = text;
- label.font = font;
- label.textColor = color;
- label.numberOfLines = 0;
- label.textAlignment = NSTextAlignmentCenter;
- return label;
-}
-
-// The cup on a warm Ko-fi disc that glows into the card, with a heart badge on its shoulder.
-- (UIView *)hero {
- UIView *disc = [UIView new];
- disc.translatesAutoresizingMaskIntoConstraints = NO;
- CAGradientLayer *fill = [CAGradientLayer layer];
- fill.frame = CGRectMake(0, 0, 80, 80);
- fill.cornerRadius = 40;
- fill.colors = @[(id)rgb(0xFF8A7A, 1).CGColor, (id)rgb(0xE8434B, 1).CGColor];
- fill.startPoint = CGPointMake(0.2, 0);
- fill.endPoint = CGPointMake(0.8, 1);
- [disc.layer addSublayer:fill];
- disc.layer.shadowColor = SGKofiColor().CGColor;
- disc.layer.shadowOpacity = UIAccessibilityIsReduceTransparencyEnabled() ? 0 : 0.75;
- disc.layer.shadowRadius = 24;
- disc.layer.shadowOffset = CGSizeZero;
- disc.layer.shadowPath = [UIBezierPath bezierPathWithOvalInRect:fill.frame].CGPath;
-
- _cup = SGSymbolView(@"cup.and.saucer.fill", 32, UIImageSymbolWeightSemibold, 80);
- _cup.tintColor = UIColor.whiteColor;
- _cup.translatesAutoresizingMaskIntoConstraints = NO;
- [disc addSubview:_cup];
-
- _heart = SGSymbolView(@"heart.fill", 13, UIImageSymbolWeightBold, 28);
- _heart.tintColor = SGKofiColor();
- _heart.backgroundColor = UIColor.whiteColor;
- _heart.layer.cornerRadius = 14;
- _heart.translatesAutoresizingMaskIntoConstraints = NO;
- [disc addSubview:_heart];
-
- [NSLayoutConstraint activateConstraints:@[
- [disc.widthAnchor constraintEqualToConstant:80],
- [disc.heightAnchor constraintEqualToConstant:80],
- [_cup.centerXAnchor constraintEqualToAnchor:disc.centerXAnchor],
- [_cup.centerYAnchor constraintEqualToAnchor:disc.centerYAnchor],
- [_heart.widthAnchor constraintEqualToConstant:28],
- [_heart.heightAnchor constraintEqualToConstant:28],
- [_heart.trailingAnchor constraintEqualToAnchor:disc.trailingAnchor constant:4],
- [_heart.bottomAnchor constraintEqualToAnchor:disc.bottomAnchor constant:2],
- ]];
- return disc;
-}
-
-- (void)viewDidLoad {
- [super viewDidLoad];
- self.view.backgroundColor = UIColor.clearColor;
-
- _backdrop = [UIView new];
- _backdrop.backgroundColor = [UIColor colorWithWhite:0 alpha:0.55];
- _backdrop.alpha = 0;
- _backdrop.translatesAutoresizingMaskIntoConstraints = NO;
- [_backdrop addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(later)]];
- [self.view addSubview:_backdrop];
-
- _card = [UIView new];
- _card.clipsToBounds = YES;
- _card.layer.cornerRadius = self.cardRadius;
- _card.layer.cornerCurve = kCACornerCurveContinuous;
- _card.translatesAutoresizingMaskIntoConstraints = NO;
- if (!NSClassFromString(@"UIGlassEffect")) _card.backgroundColor = [UIColor colorWithWhite:0.08 alpha:0.6];
- _warmth = [CAGradientLayer layer];
- _warmth.type = kCAGradientLayerRadial;
- _warmth.colors = @[(id)rgb(0xFF5E5B, 0.32).CGColor, (id)rgb(0xFF5E5B, 0).CGColor];
- _warmth.startPoint = CGPointMake(0.5, 0);
- _warmth.endPoint = CGPointMake(1.15, 0.75);
- [_card.layer addSublayer:_warmth];
- [self.view addSubview:_card];
-
- UIView *hero = [self hero];
- UILabel *eyebrow = [self label:@"A STUDENT PROJECT" font:[UIFont systemFontOfSize:12 weight:UIFontWeightBold] color:SGKofiColor()];
- eyebrow.attributedText = [[NSAttributedString alloc] initWithString:eyebrow.text attributes:@{NSKernAttributeName: @1.4}];
- UILabel *title = [self label:@"Enjoying spoti.pw?" font:[UIFont systemFontOfSize:26 weight:UIFontWeightBold] color:UIColor.whiteColor];
- UILabel *body = [self label:@"I'm a student and I build it for free, in my spare time. If it made your music better, a coffee helps me keep going."
- font:[UIFont systemFontOfSize:15] color:[UIColor colorWithWhite:1 alpha:0.72]];
-
- SGKofiButton *donate = [[SGKofiButton alloc] initWithTitle:@"Buy me a coffee" prominent:YES];
- [donate addTarget:self action:@selector(donate) forControlEvents:UIControlEventTouchUpInside];
-
- UIButtonConfiguration *config = [UIButtonConfiguration plainButtonConfiguration];
- config.baseForegroundColor = [UIColor colorWithWhite:1 alpha:0.6];
- config.attributedTitle = [[NSAttributedString alloc] initWithString:@"Maybe later" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:15 weight:UIFontWeightMedium]}];
- UIButton *later = [UIButton buttonWithConfiguration:config primaryAction:nil];
- [later addTarget:self action:@selector(later) forControlEvents:UIControlEventTouchUpInside];
-
- UILabel *thanks = [self label:@"Also built on JamesDSP and EeveeSpotify. Thank you to everyone behind them."
- font:[UIFont systemFontOfSize:11] color:[UIColor colorWithWhite:1 alpha:0.38]];
-
- UIStackView *column = [[UIStackView alloc] initWithArrangedSubviews:@[hero, eyebrow, title, body, donate, later, thanks]];
- column.axis = UILayoutConstraintAxisVertical;
- column.alignment = UIStackViewAlignmentCenter;
- column.spacing = 8;
- [column setCustomSpacing:22 afterView:hero];
- [column setCustomSpacing:4 afterView:eyebrow];
- [column setCustomSpacing:26 afterView:body];
- [column setCustomSpacing:6 afterView:donate];
- [column setCustomSpacing:10 afterView:later];
- column.translatesAutoresizingMaskIntoConstraints = NO;
- [_card addSubview:column];
-
- UILayoutGuide *safe = self.view.safeAreaLayoutGuide;
- [NSLayoutConstraint activateConstraints:@[
- [_backdrop.topAnchor constraintEqualToAnchor:self.view.topAnchor],
- [_backdrop.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor],
- [_backdrop.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
- [_backdrop.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
- [_card.leadingAnchor constraintEqualToAnchor:safe.leadingAnchor constant:kCardMargin],
- [_card.trailingAnchor constraintEqualToAnchor:safe.trailingAnchor constant:-kCardMargin],
- [_card.widthAnchor constraintLessThanOrEqualToConstant:460],
- [_card.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor],
- [_card.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:-kCardMargin],
- [_card.topAnchor constraintGreaterThanOrEqualToAnchor:safe.topAnchor constant:kCardMargin],
- [column.topAnchor constraintEqualToAnchor:_card.topAnchor constant:36],
- [column.leadingAnchor constraintEqualToAnchor:_card.leadingAnchor constant:kCardPadding],
- [column.trailingAnchor constraintEqualToAnchor:_card.trailingAnchor constant:-kCardPadding],
- [column.bottomAnchor constraintLessThanOrEqualToAnchor:_card.bottomAnchor constant:-kCardPadding],
- [donate.widthAnchor constraintEqualToAnchor:column.widthAnchor],
- [body.widthAnchor constraintLessThanOrEqualToAnchor:column.widthAnchor],
- [thanks.widthAnchor constraintLessThanOrEqualToAnchor:column.widthAnchor constant:-24],
- ]];
- // Clear of the home indicator; without one the card's own padding wins.
- NSLayoutConstraint *indicator = [column.bottomAnchor constraintEqualToAnchor:safe.bottomAnchor constant:-8];
- indicator.priority = UILayoutPriorityDefaultHigh;
- indicator.active = YES;
- _card.transform = CGAffineTransformMakeTranslation(0, 700);
-}
-
-- (void)viewDidLayoutSubviews {
- [super viewDidLayoutSubviews];
- UIVisualEffectView *pane = SGGlassFor(_card, &kCardGlassKey);
- pane.frame = _card.bounds;
- SGShapeGlass(pane, self.cardRadius, NO);
- [CATransaction begin];
- [CATransaction setDisableActions:YES];
- _warmth.frame = _card.bounds;
- [CATransaction commit];
-}
-
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- [UIView animateWithDuration:0.3 animations:^{ self->_backdrop.alpha = 1; }];
- [UIView animateWithDuration:0.62 delay:0 usingSpringWithDamping:0.8 initialSpringVelocity:0
- options:UIViewAnimationOptionAllowUserInteraction animations:^{
- self->_card.transform = CGAffineTransformIdentity;
- } completion:nil];
- if (@available(iOS 17.0, *)) {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.35 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- [self->_cup addSymbolEffect:[NSClassFromString(@"NSSymbolBounceEffect") effect]];
- });
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- [self->_heart addSymbolEffect:[NSClassFromString(@"NSSymbolBounceEffect") effect]];
- });
- }
-}
-
-- (void)leaveThen:(void (^)(void))then {
- if (_leaving) return;
- _leaving = YES;
- [UIView animateWithDuration:0.28 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
- self->_backdrop.alpha = 0;
- self->_card.transform = CGAffineTransformMakeTranslation(0, self->_card.bounds.size.height + 40);
- } completion:^(BOOL finished) {
- [self dismissViewControllerAnimated:NO completion:then];
- }];
-}
-
-- (void)donate {
- askAgainIn(kAfterDonating);
- SGLog(@"donate: opened Ko-fi");
- [self leaveThen:^{ SGOpenURL(SGKofiURL); }];
-}
-
-- (void)later {
- [self leaveThen:nil];
-}
-
-@end
-
-#pragma mark - entry
-
-static __weak SGDonateController *sg_sheet;
-static BOOL sg_offered;
-
-void SGShowDonateSheet(void) {
- UIViewController *top = SGTopController();
- if (sg_sheet || !top || [top isKindOfClass:UIAlertController.class]) return;
- SGDonateController *sheet = [SGDonateController new];
- sg_sheet = sheet;
- [top presentViewController:sheet animated:NO completion:nil];
-}
-
-SGModRow *SGDonateRow(void) {
- SGModRow *row = SGWithSymbol(SGActionRow(@"Support spoti.pw", @"Buy the student behind it a coffee", ^{ SGShowDonateSheet(); }), @"cup.and.saucer.fill");
- row.color = SGKofiColor();
- return row;
-}
-
-// Never over the tour or an alert. On schedule it also stays out of an update-notice run and asks once
-// a run; after a tour, first or replayed from the Mod page, it always comes.
-static void offerWhenClear(NSInteger tries) {
- BOOL afterTour = SGDonateAfterTourPending();
- if (!afterTour && (sg_offered || now() < nextAsk() || SGUpdateNoticeShown())) return;
- UIViewController *top = SGTopController();
- BOOL busy = !top || SGOnboardingShowing() || [top isKindOfClass:UIAlertController.class]
- || UIApplication.sharedApplication.applicationState != UIApplicationStateActive;
- if (busy) {
- if (tries > 0)
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kRetry * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ offerWhenClear(tries - 1); });
- return;
- }
- sg_offered = YES;
- askAgainIn(kEvery);
- [NSUserDefaults.standardUserDefaults removeObjectForKey:kAfterTourKey];
- SGShowDonateSheet();
- SGLog(@"donate: asked over %@%@", NSStringFromClass(top.class), afterTour ? @", after the tour" : @"");
-}
-
-void SGDonateAfterTour(BOOL restarting) {
- [NSUserDefaults.standardUserDefaults setBool:YES forKey:kAfterTourKey];
- if (!restarting) SGOfferDonate();
-}
-
-void SGOfferDonate(void) {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ offerWhenClear(kTries); });
-}
-
-void SGWatchForDonate(void) {
- nextAsk();
- __block id observer = [NSNotificationCenter.defaultCenter addObserverForName:UIApplicationDidBecomeActiveNotification
- object:nil
- queue:NSOperationQueue.mainQueue
- usingBlock:^(NSNotification *note) {
- [NSNotificationCenter.defaultCenter removeObserver:observer];
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kSettle * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ offerWhenClear(kTries); });
- }];
-}
diff --git a/tweak/Sources/App/ModSettings.x b/tweak/Sources/App/ModSettings.x
index 4d23b092..1533ed2c 100644
--- a/tweak/Sources/App/ModSettings.x
+++ b/tweak/Sources/App/ModSettings.x
@@ -22,7 +22,6 @@
#import "Shared/AudioEffects/AudioEffectsPage.h"
#import "Shared/LiveActivity/LiveActivity.h"
#import "App/About/About.h"
-#import "App/Donate/Donate.h"
#import "Pages.h"
static const CGFloat kRowHeight = 56;
@@ -40,7 +39,6 @@ static UIViewController *modSettingsPage(void) {
// that no switch can put right, and it is worth reading before anything else.
SGModRow *signing = SGSigningWarningRow();
if (signing) [sections addObject:SGSection(nil, @[signing])];
- [sections addObject:SGSection(nil, @[SGDonateRow()])];
SGModRow *mod = pageRow(@"Mod", @"info.circle", ^UIViewController *{ return SGAboutPage(); });
mod.value = ^NSString *{ return @(SG_VERSION); };
// The audio effects work on the sound, so both looks have them, with what they are doing beside the chevron.
@@ -71,7 +69,7 @@ static UIViewController *modSettingsPage(void) {
mod,
]),
]];
- return [[SGModPage alloc] initWithTitle:@"spoti.pw" intro:nil sections:sections footer:nil];
+ return [[SGModPage alloc] initWithTitle:@"Vitrine" intro:nil sections:sections footer:nil];
}
#pragma mark - row in the settings list and the side drawer
@@ -249,5 +247,4 @@ static BOOL isSettingsRoot(UIViewController *list) {
SGRegisterPages();
SGCheckSigningOnce();
SGWatchForUpdates();
- SGWatchForDonate();
}
diff --git a/tweak/Sources/App/Onboarding/Onboarding.x b/tweak/Sources/App/Onboarding/Onboarding.x
index 0d6bef99..6e4f4625 100644
--- a/tweak/Sources/App/Onboarding/Onboarding.x
+++ b/tweak/Sources/App/Onboarding/Onboarding.x
@@ -1,9 +1,7 @@
// The tour goes up the first time Home appears, not at launch: a fresh sideload lands on the login
// screen first, and a tour over that is wrong. A moment after, so Home has drawn under the glass.
-// A tour that ended in a restart leaves the donate sheet for this Home instead.
#import "Core/SGCore.h"
#import "Onboarding.h"
-#import "App/Donate/Donate.h"
%hook _TtC19Home_FunkisPageImpl20FunkisViewController
- (void)viewDidAppear:(BOOL)animated {
@@ -11,15 +9,14 @@
static dispatch_once_t once;
dispatch_once(&once, ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.8 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- if (SGFlag(SGKeyOnboardingSeen, NO)) SGOfferDonate();
- else SGShowOnboarding();
+ if (!SGFlag(SGKeyOnboardingSeen, NO)) SGShowOnboarding();
});
});
}
%end
%ctor {
- if (SGFlag(SGKeyOnboardingSeen, NO) && !SGDonateAfterTourPending()) return;
+ if (SGFlag(SGKeyOnboardingSeen, NO)) return;
%init;
SGRequireClasses(@[@"_TtC19Home_FunkisPageImpl20FunkisViewController"]);
}
diff --git a/tweak/Sources/App/Onboarding/Tour.m b/tweak/Sources/App/Onboarding/Tour.m
index ba8d859e..bab1ec92 100644
--- a/tweak/Sources/App/Onboarding/Tour.m
+++ b/tweak/Sources/App/Onboarding/Tour.m
@@ -3,7 +3,6 @@
#import "Onboarding.h"
#import "App/About/About.h"
#import "App/Pages.h"
-#import "App/Donate/Donate.h"
static const CGFloat kMargin = 24;
static const CGFloat kCardRadius = 22;
@@ -164,7 +163,7 @@ static UIButton *glassButton(NSString *title) {
UIImageView *icon = SGSymbolView(@"exclamationmark.triangle.fill", 15, UIImageSymbolWeightSemibold, 22);
icon.tintColor = UIColor.systemYellowColor;
UILabel *text = [UILabel new];
- text.text = @"The redesign is a beta. Expect lags, freezes and bugs, and if you find one, please report it.";
+ text.text = @"The redesign is a beta. Expect lags, freezes and bugs.";
text.font = [UIFont systemFontOfSize:13];
text.textColor = SGGrey();
text.numberOfLines = 0;
@@ -182,7 +181,7 @@ static UIButton *glassButton(NSString *title) {
}]];
report.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading;
- UIStackView *note = [[UIStackView alloc] initWithArrangedSubviews:@[line, report]];
+ UIStackView *note = [[UIStackView alloc] initWithArrangedSubviews:SGRepoURL ? @[line, report] : @[line]];
note.axis = UILayoutConstraintAxisVertical;
note.alignment = UIStackViewAlignmentLeading;
note.spacing = 2;
@@ -315,7 +314,6 @@ static UIButton *glassButton(NSString *title) {
}
- (void)finish {
- SGDonateAfterTour(self.needsRestart);
SGSetEnabled(SGKeyOnboardingSeen, YES);
SGSetRedesignedUI(_redesigned.selected);
if (self.needsRestart) {
diff --git a/tweak/Sources/App/Pages.m b/tweak/Sources/App/Pages.m
index 1e10448d..566a5033 100644
--- a/tweak/Sources/App/Pages.m
+++ b/tweak/Sources/App/Pages.m
@@ -18,7 +18,7 @@
#import "Redesigned/NowPlayingBar/NowPlayingBar.h"
#import "Redesigned/Kit/SGRAccent.h"
-NSString *const SGRedesignedUIInfo = @"The newest version of spoti.pw, leaning towards Apple Music's style. It is not compatible with the legacy look's settings.\n\nThe legacy look gives you more freedom, yet still looks like Spotify.";
+NSString *const SGRedesignedUIInfo = @"The newest version of Vitrine, leaning towards Apple Music's style. It is not compatible with the legacy look's settings.\n\nThe legacy look gives you more freedom, yet still looks like Spotify.";
void SGSetRedesignedUI(BOOL on) {
SGSetEnabled(SGKeyRedesign, on);
diff --git a/tweak/Sources/Settings/SGModPage.m b/tweak/Sources/Settings/SGModPage.m
index 1f04da0e..ac1dce64 100644
--- a/tweak/Sources/Settings/SGModPage.m
+++ b/tweak/Sources/Settings/SGModPage.m
@@ -701,7 +701,7 @@ static const CGFloat kSliderTop = 12, kSliderLine = 18, kSliderSubtitle = 14, kS
UIAlertController *alert = [UIAlertController alertControllerWithTitle:[row.title stringByAppendingString:@" is unstable"]
message:row.warning
preferredStyle:UIAlertControllerStyleAlert];
- [alert addAction:[UIAlertAction actionWithTitle:@"Open GitHub" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+ if (SGRepoURL) [alert addAction:[UIAlertAction actionWithTitle:@"Open GitHub" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
SGOpenURL(SGRepoURL);
}]];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]];
diff --git a/tweak/Sources/Settings/SGPageStyle.h b/tweak/Sources/Settings/SGPageStyle.h
index cd116573..d14eeb4b 100644
--- a/tweak/Sources/Settings/SGPageStyle.h
+++ b/tweak/Sources/Settings/SGPageStyle.h
@@ -30,7 +30,6 @@ CGFloat SGSectionFooterHeight(UITableView *table, NSString *text);
UITableViewCell *SGDequeueCell(UITableView *table, NSString *identifier);
void SGOpenURL(NSString *url);
-extern NSString *const SGSiteURL;
extern NSString *const SGRepoURL;
// The controller on top of the key window, through whatever is presented over it.
UIViewController *SGTopController(void);
diff --git a/tweak/Sources/Settings/SGPageStyle.m b/tweak/Sources/Settings/SGPageStyle.m
index 3500823b..4049ec8d 100644
--- a/tweak/Sources/Settings/SGPageStyle.m
+++ b/tweak/Sources/Settings/SGPageStyle.m
@@ -207,8 +207,8 @@ UIViewController *SGTopController(void) {
return top;
}
-NSString *const SGSiteURL = @"https://spoti.pw";
-NSString *const SGRepoURL = @"https://github.com/skopevoj/spoti.pw";
+// The fork's repo. Its links stay hidden while this is nil.
+NSString *const SGRepoURL = nil;
void SGOpenURL(NSString *url) {
NSURL *target = url ? [NSURL URLWithString:url] : nil;
diff --git a/tweak/Sources/Shared/AudioEffects/AudioEffects.h b/tweak/Sources/Shared/AudioEffects/AudioEffects.h
index 1b1eff4b..09b934d6 100644
--- a/tweak/Sources/Shared/AudioEffects/AudioEffects.h
+++ b/tweak/Sources/Shared/AudioEffects/AudioEffects.h
@@ -111,7 +111,7 @@ typedef NS_ENUM(NSInteger, SGDSPFileKind) {
SGDSPFileLiveprog, // Liveprog's .eel
};
-// Documents/spoti.pw/Audio effects/<Convolver|DDC|Liveprog>, made on first use, empty until files are imported.
+// Documents/Vitrine/Audio effects/<Convolver|DDC|Liveprog>, made on first use, empty until files are imported.
NSString *SGDSPLibraryDirectory(SGDSPFileKind kind);
NSArray<NSString *> *SGDSPLibraryFiles(SGDSPFileKind kind); // names, sorted
NSArray<NSString *> *SGDSPFileExtensions(SGDSPFileKind kind); // lowercase, without the dot
diff --git a/tweak/Sources/Shared/AudioEffects/AudioEffectsFiles.m b/tweak/Sources/Shared/AudioEffects/AudioEffectsFiles.m
index 7552359e..930554e5 100644
--- a/tweak/Sources/Shared/AudioEffects/AudioEffectsFiles.m
+++ b/tweak/Sources/Shared/AudioEffects/AudioEffectsFiles.m
@@ -1,4 +1,4 @@
-// The audio effects' file libraries: Documents/spoti.pw/Audio effects/<Convolver|DDC|Liveprog>, where the
+// The audio effects' file libraries: Documents/Vitrine/Audio effects/<Convolver|DDC|Liveprog>, where the
// file effects find their files by name. Documents, which the app's backups keep. Every file in them is
// one the user imported.
//
@@ -58,14 +58,16 @@ static void adoptEarlierLibrary(SGDSPFileKind kind, NSString *documents, NSStrin
]];
});
NSFileManager *files = NSFileManager.defaultManager;
- NSString *earlier = [[documents stringByAppendingPathComponent:@"spoti.pw/JamesDSP"] stringByAppendingPathComponent:libraryName(kind)];
NSUInteger moved = 0;
- for (NSString *name in [files contentsOfDirectoryAtPath:earlier error:nil]) {
- if ([name hasPrefix:@"."] || [installedByEngine containsObject:name]) continue;
- NSString *from = [earlier stringByAppendingPathComponent:name];
- BOOL isDirectory = NO;
- if (![files fileExistsAtPath:from isDirectory:&isDirectory] || isDirectory) continue;
- if ([files moveItemAtPath:from toPath:[directory stringByAppendingPathComponent:name] error:nil]) moved++;
+ for (NSString *home in @[@"spoti.pw/JamesDSP", @"spoti.pw/Audio effects"]) {
+ NSString *earlier = [[documents stringByAppendingPathComponent:home] stringByAppendingPathComponent:libraryName(kind)];
+ for (NSString *name in [files contentsOfDirectoryAtPath:earlier error:nil]) {
+ if ([name hasPrefix:@"."] || [installedByEngine containsObject:name]) continue;
+ NSString *from = [earlier stringByAppendingPathComponent:name];
+ BOOL isDirectory = NO;
+ if (![files fileExistsAtPath:from isDirectory:&isDirectory] || isDirectory) continue;
+ if ([files moveItemAtPath:from toPath:[directory stringByAppendingPathComponent:name] error:nil]) moved++;
+ }
}
if (moved) SGLog(@"dsp: %lu files moved into the %@ library", (unsigned long)moved, libraryName(kind));
}
@@ -73,7 +75,7 @@ static void adoptEarlierLibrary(SGDSPFileKind kind, NSString *documents, NSStrin
NSString *SGDSPLibraryDirectory(SGDSPFileKind kind) {
static os_unfair_lock lock = OS_UNFAIR_LOCK_INIT;
NSString *documents = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;
- NSString *directory = [[documents stringByAppendingPathComponent:@"spoti.pw/Audio effects"] stringByAppendingPathComponent:libraryName(kind)];
+ NSString *directory = [[documents stringByAppendingPathComponent:@"Vitrine/Audio effects"] stringByAppendingPathComponent:libraryName(kind)];
os_unfair_lock_lock(&lock);
BOOL isDirectory = NO;
if (![NSFileManager.defaultManager fileExistsAtPath:directory isDirectory:&isDirectory] || !isDirectory) {
diff --git a/tweak/Sources/Shared/LyricsSources/LrcLib.m b/tweak/Sources/Shared/LyricsSources/LrcLib.m
index 48c1ea6d..dce66395 100644
--- a/tweak/Sources/Shared/LyricsSources/LrcLib.m
+++ b/tweak/Sources/Shared/LyricsSources/LrcLib.m
@@ -15,7 +15,7 @@ static NSString *const kSearch = @"https://lrclib.net/api/search";
static const NSInteger kLengthSlack = 4;
static NSDictionary<NSString *, NSString *> *headers(void) {
- return @{@"User-Agent": @"spoti.pw " @SG_VERSION @" (https://github.com/skopevoj/spoti.pw)"};
+ return @{@"User-Agent": @"Vitrine " @SG_VERSION};
}
// [00:34.30] Look — the timestamp in minutes, seconds and hundredths, or thousandths where a line
diff --git a/tweak/Sources/Shared/LyricsSources/LyricsHook.x b/tweak/Sources/Shared/LyricsSources/LyricsHook.x
index ce3f86ba..ef28e2cd 100644
--- a/tweak/Sources/Shared/LyricsSources/LyricsHook.x
+++ b/tweak/Sources/Shared/LyricsSources/LyricsHook.x
@@ -14,7 +14,7 @@ static NSString *const kCardListPath = @"/scrollsita/";
static NSString *const kTrackPrefix = @"spotify:track:";
// On a request sent to the donor, the track it really asks for.
static NSString *const kDonorForKey = @"spotifyglass.lyricsDonorFor";
-static NSString *const kUnnamedProvider = @"spoti.pw";
+static NSString *const kUnnamedProvider = @"Vitrine";
typedef void (^SGDisposition)(NSURLSessionResponseDisposition disposition);
typedef void (^SGForwardResponse)(NSURLResponse *response, SGDisposition handler);
diff --git a/tweak/control b/tweak/control
index 676ceb40..d81a4d85 100644
--- a/tweak/control
+++ b/tweak/control
@@ -1,7 +1,7 @@
-Package: com.spotipw
-Name: spoti.pw
+Package: com.vitrine.tweak
+Name: Vitrine
Architecture: iphoneos-arm
Description: Liquid Glass for the Spotify iOS app
-Maintainer: spoti.pw
-Author: spoti.pw
+Maintainer: Vitrine
+Author: Vitrine
Section: Tweaks