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: bring your own ipa pipeline

Vojtěch Škopek50a111d4a826
diff --git a/.github/workflows/build-ipa.yml b/.github/workflows/build-ipa.yml
index 86581179..8152ab45 100644
--- a/.github/workflows/build-ipa.yml
+++ b/.github/workflows/build-ipa.yml
@@ -46,7 +46,7 @@ jobs:
run: |
mkdir -p ipa
curl -fsSL "${{ inputs.ipa_url }}" -o ipa/spotify.ipa
- [ "$(file --mime-type -b ipa/spotify.ipa)" = application/zip ] || { echo "::error::Not an IPA"; exit 1; }
+ case "$(file --mime-type -b ipa/spotify.ipa)" in application/zip|application/x-ios-app) ;; *) echo "::error::Not an IPA"; exit 1 ;; esac
- run: make release
diff --git a/scripts/extract-flags.py b/scripts/extract-flags.py
index 3daf6b75..e27e59f9 100755
--- a/scripts/extract-flags.py
+++ b/scripts/extract-flags.py
@@ -9,7 +9,7 @@ the leaf calls inlined recovers key, type and default for nearly every flag.
scripts/extract-flags.py ipa/com.spotify.client-9.1.78-Decrypted.ipa
"""
-import re, struct, subprocess, sys, tempfile, zipfile
+import plistlib, re, struct, subprocess, sys, tempfile, zipfile
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
@@ -243,7 +243,9 @@ def main():
flags[key] = ('Enum', 0, 0, 0)
for key in binary.keys.values():
flags.setdefault(key, ('Unknown', 0, 0, 0))
- version = re.search(r'(\d+\.\d+\.\d+)', ipa.name).group(1)
+ with zipfile.ZipFile(ipa) as z:
+ info = next(n for n in z.namelist() if re.fullmatch(r'Payload/[^/]+\.app/Info\.plist', n))
+ version = plistlib.loads(z.read(info))['CFBundleShortVersionString']
lines = [f'// Generated by scripts/extract-flags.py from Spotify {version}. Do not edit.',
'#import "SGCommon.h"', '', 'const SGFlagDef SGFlagTable[] = {']
for key in sorted(flags):