Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

test(ios): validate the bundled icon in resource checks

debpalash2ebddc7a95fe
diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml
index 3cdb369b1..96ab48a5d 100644
--- a/.github/workflows/mobile.yml
+++ b/.github/workflows/mobile.yml
@@ -93,6 +93,9 @@ jobs:
with:
persist-credentials: false
+ - name: Bundle and validate iOS resources
+ run: python3 mobile/ios/scripts/test_resources.py
+
- name: VoiceStudioKit tests
working-directory: mobile/ios/VoiceStudioKit
run: swift test
diff --git a/mobile/ios/scripts/test_resources.py b/mobile/ios/scripts/test_resources.py
index 81777afb4..aa54cf98d 100644
--- a/mobile/ios/scripts/test_resources.py
+++ b/mobile/ios/scripts/test_resources.py
@@ -26,7 +26,8 @@ class BrandResources(unittest.TestCase):
cls.directory.cleanup()
def test_icon_is_opaque_1024_and_registered(self):
- icon = self.assets / "AppIcon.appiconset"
+ icon = resources.IOS / "VoiceStudio/Resources/Assets.xcassets/AppIcon.appiconset"
+ self.assertFalse((self.assets / "AppIcon.appiconset").exists())
entry = json.loads((icon / "Contents.json").read_text())["images"][0]
data = (icon / entry["filename"]).read_bytes()
self.assertEqual(data[:8], b"\x89PNG\r\n\x1a\n")