From 1b0865fe8f42e13467b3f14e9fa84c14a349be7d Mon Sep 17 00:00:00 2001 From: eevee Date: Tue, 4 Mar 2025 20:41:08 +0300 Subject: [PATCH] fix crashes on 9.0.22, bump --- Sources/EeveeSpotify/DarkPopUps.x.swift | 8 ++++++-- Sources/EeveeSpotify/Tweak.x.swift | 5 +++-- control | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Sources/EeveeSpotify/DarkPopUps.x.swift b/Sources/EeveeSpotify/DarkPopUps.x.swift index ab7703e..239621a 100644 --- a/Sources/EeveeSpotify/DarkPopUps.x.swift +++ b/Sources/EeveeSpotify/DarkPopUps.x.swift @@ -4,13 +4,17 @@ import SwiftUI struct DarkPopUps: HookGroup { } +private let popUpContainerViewController = EeveeSpotify.isOldSpotifyVersion + ? "SPTEncorePopUpContainer" + : "EncoreConsumerMobile_Wrappers.PopUpPresentableContainer" + class EncoreLabelHook: ClassHook { typealias Group = DarkPopUps static let targetName = "SPTEncoreLabel" func intrinsicContentSize() -> CGSize { if let viewController = WindowHelper.shared.viewController(for: target), - NSStringFromClass(type(of: viewController)) == "SPTEncorePopUpContainer" + NSStringFromClass(type(of: viewController)) == popUpContainerViewController { let label = Dynamic.convert(target.subviews.first!, to: UILabel.self) @@ -25,7 +29,7 @@ class EncoreLabelHook: ClassHook { class SPTEncorePopUpContainerHook: ClassHook { typealias Group = DarkPopUps - static let targetName = "SPTEncorePopUpContainer" + static let targetName = popUpContainerViewController func containedView() -> SPTEncorePopUpDialog { return orig.containedView() diff --git a/Sources/EeveeSpotify/Tweak.x.swift b/Sources/EeveeSpotify/Tweak.x.swift index 9da3085..9668bbc 100644 --- a/Sources/EeveeSpotify/Tweak.x.swift +++ b/Sources/EeveeSpotify/Tweak.x.swift @@ -11,8 +11,9 @@ func exitApplication() { struct PremiumPatchingGroup: HookGroup { } struct EeveeSpotify: Tweak { - static let version = "5.8.7" - static let isOldSpotifyVersion = NSClassFromString("Lyrics_NPVCommunicatorImpl.LyricsOnlyViewController") == nil + static let version = "5.8.8" + static let isOldSpotifyVersion = + NSClassFromString("Lyrics_NPVCommunicatorImpl.LyricsOnlyViewController") == nil init() { if UserDefaults.darkPopUps { diff --git a/control b/control index cbcd276..e523042 100644 --- a/control +++ b/control @@ -1,6 +1,6 @@ Package: com.eevee.spotify Name: EeveeSpotify -Version: 5.8.7 +Version: 5.8.8 Architecture: iphoneos-arm Description: A tweak to get Spotify Premium for free, just like Spotilife Maintainer: Eevee