diff --git a/.github/workflows/build-swift.yml b/.github/workflows/build-swift.yml index d8317cd..2f27402 100644 --- a/.github/workflows/build-swift.yml +++ b/.github/workflows/build-swift.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '15.3' + xcode-version: '16.0' - name: Setup Theos uses: actions/checkout@v4 @@ -32,16 +32,16 @@ jobs: - name: Copy SwiftProtobuf (rootful) run: | mkdir swiftprotobuf && cd "$_" - wget https://github.com/whoeevee/EeveeSpotify/releases/download/swift2.0/org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm.deb - ar -x org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm.deb + wget https://github.com/whoeevee/swift-protobuf/releases/download/1.28.1/org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm.deb + ar -x org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm.deb tar -xvf data.tar.lzma cp -r Library/Frameworks/SwiftProtobuf.framework $THEOS/lib - name: Copy SwiftProtobuf (rootless) run: | mkdir swiftprotobuf-rootless && cd "$_" - wget https://github.com/whoeevee/EeveeSpotify/releases/download/swift2.0/org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm64.deb - ar -x org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm64.deb + wget https://github.com/whoeevee/swift-protobuf/releases/download/1.28.1/org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm64.deb + ar -x org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm64.deb tar -xvf data.tar.lzma cp -r var/jb/Library/Frameworks/SwiftProtobuf.framework $THEOS/lib/iphone/rootless diff --git a/Sources/EeveeSpotify/DataLoaderServiceHooks.x.swift b/Sources/EeveeSpotify/DataLoaderServiceHooks.x.swift index eeb9442..f02958f 100644 --- a/Sources/EeveeSpotify/DataLoaderServiceHooks.x.swift +++ b/Sources/EeveeSpotify/DataLoaderServiceHooks.x.swift @@ -32,7 +32,7 @@ class SPTDataLoaderServiceHook: ClassHook, SpotifySessionDelegate { session, dataTask: task, didReceiveData: try getLyricsForCurrentTrack( - originalLyrics: try? Lyrics(serializedData: buffer) + originalLyrics: try? Lyrics(serializedBytes: buffer) ) ) @@ -46,13 +46,13 @@ class SPTDataLoaderServiceHook: ClassHook, SpotifySessionDelegate { } do { - var customizeMessage = try CustomizeMessage(serializedData: buffer) + var customizeMessage = try CustomizeMessage(serializedBytes: buffer) modifyRemoteConfiguration(&customizeMessage.response) orig.URLSession( session, dataTask: task, - didReceiveData: try customizeMessage.serializedData() + didReceiveData: try customizeMessage.serializedBytes() ) orig.URLSession(session, task: task, didCompleteWithError: nil) diff --git a/Sources/EeveeSpotify/Lyrics/CustomLyrics.x.swift b/Sources/EeveeSpotify/Lyrics/CustomLyrics.x.swift index e984f55..d3d9db8 100644 --- a/Sources/EeveeSpotify/Lyrics/CustomLyrics.x.swift +++ b/Sources/EeveeSpotify/Lyrics/CustomLyrics.x.swift @@ -280,5 +280,5 @@ func getLyricsForCurrentTrack(originalLyrics: Lyrics? = nil) throws -> Data { } preloadedLyrics = nil - return try lyrics.serializedData() + return try lyrics.serializedBytes() } diff --git a/Sources/EeveeSpotify/Lyrics/Repositories/MusixmatchLyricsRepository.swift b/Sources/EeveeSpotify/Lyrics/Repositories/MusixmatchLyricsRepository.swift index a67c113..8e2ad80 100644 --- a/Sources/EeveeSpotify/Lyrics/Repositories/MusixmatchLyricsRepository.swift +++ b/Sources/EeveeSpotify/Lyrics/Repositories/MusixmatchLyricsRepository.swift @@ -78,13 +78,6 @@ class MusixmatchLyricsRepository: LyricsRepository { } private func getFirstSubtitle(_ subtitlesMessage: [String: Any]) throws -> [String: Any] { - guard - let subtitlesHeader = subtitlesMessage["header"] as? [String: Any], - let subtitlesStatusCode = subtitlesHeader["status_code"] as? Int - else { - throw LyricsError.DecodingError - } - guard let subtitlesBody = subtitlesMessage["body"] as? [String: Any], let subtitleList = subtitlesBody["subtitle_list"] as? [[String: Any]], diff --git a/Sources/EeveeSpotify/Premium/DynamicPremium+ModifyBootstrap.x.swift b/Sources/EeveeSpotify/Premium/DynamicPremium+ModifyBootstrap.x.swift index 3f831e8..cf447bb 100644 --- a/Sources/EeveeSpotify/Premium/DynamicPremium+ModifyBootstrap.x.swift +++ b/Sources/EeveeSpotify/Premium/DynamicPremium+ModifyBootstrap.x.swift @@ -60,7 +60,7 @@ class SpotifySessionDelegateBootstrapHook: ClassHook, SpotifySessionDe let buffer = URLSessionHelper.shared.obtainData(for: url)! do { - var bootstrapMessage = try BootstrapMessage(serializedData: buffer) + var bootstrapMessage = try BootstrapMessage(serializedBytes: buffer) if UserDefaults.patchType == .notSet { if bootstrapMessage.attributes["type"]?.stringValue == "premium" { @@ -81,7 +81,7 @@ class SpotifySessionDelegateBootstrapHook: ClassHook, SpotifySessionDe orig.URLSession( session, dataTask: task, - didReceiveData: try bootstrapMessage.serializedData() + didReceiveData: try bootstrapMessage.serializedBytes() ) NSLog("[EeveeSpotify] Modified bootstrap data") diff --git a/Sources/EeveeSpotify/Premium/Helpers/BundleHelper.swift b/Sources/EeveeSpotify/Premium/Helpers/BundleHelper.swift index 3377552..5492e66 100755 --- a/Sources/EeveeSpotify/Premium/Helpers/BundleHelper.swift +++ b/Sources/EeveeSpotify/Premium/Helpers/BundleHelper.swift @@ -33,7 +33,7 @@ class BundleHelper { func resolveConfiguration() throws -> ResolveConfiguration { return try ResolveConfiguration( - serializedData: try Data( + serializedBytes: try Data( contentsOf: self.bundle.url( forResource: "resolveconfiguration", withExtension: "bnk" diff --git a/control b/control index f91b54c..4948493 100644 --- a/control +++ b/control @@ -6,4 +6,4 @@ Description: A tweak to get Spotify Premium for free, just like Spotilife Maintainer: Eevee Author: Eevee Section: Tweaks -Depends: ${ORION}, firmware (>= 14.0), org.swift.protobuf.swiftprotobuf +Depends: ${ORION}, firmware (>= 14.0), org.swift.protobuf.swiftprotobuf (>= 1.28.1)