Skip to content

Add Dialer Themer, Clear Collections, and Videos wallpapers - #192

Merged
huami1314 merged 3 commits into
huami1314:mainfrom
Bonnie-Blue-AIO:gestaltx-v1.1.2-upstream
Dec 3, 2026
Merged

huami1314 merged 3 commits into
huami1314:mainfrom
Bonnie-Blue-AIO:gestaltx-v1.1.2-upstream

Conversation

@Bonnie-Blue-AIO

Copy link
Copy Markdown
Contributor

Add Dialer Themer, Clear Collections, and Videos wallpapers

Summary

Adds three customization features, plus bug fixes found while using them. Marketing version, changelog, and GitHub Actions workflow are left unchanged for the maintainer to decide. Credits and licenses for the ports are in THIRD_PARTY_NOTICES.md and the in-app About credits.

Per-feature changelog

1. Dialer Themer

What it does. Ports Erosion's keypad theme importer so the Phone app dial pad can be themed from GestaltX, without a second app. You import a TelephonyUI-8 / TelephonyUI-9 / TelephonyUI-10 theme zip (the importer also finds those folders when they are wrapped inside the zip), preview the 12 keys, apply them into com.apple.mobilephone → Library/Caches/TelephonyUI-10, and restore the stock keys later. After applying, open Phone and toggle light/dark until the keys appear; do not force-quit Phone. The green call button cannot be themed (same limitation as Erosion).

How to use it. Tools → Customization → Dialer Themer → import zip → preview → Apply. Restore Original puts the stock keys back.

Files added

  • GestaltX/DialerThemerManager.swift
  • GestaltX/DialerThemerView.swift
  • DIALER_THEMER.md (short usage note)

Files changed

  • GestaltX/ContentView.swift — Tools → Customization entry
  • GestaltX/GXCustomizationAccess.h / GestaltX/GXCustomizationAccess.m — resolveDataContainer(for:) for the Phone container; openApplication also allows launch identifiers (Phone) so the user can jump back to the themed app
  • GestaltX/Licenses/ThirdPartyNotices.txt, THIRD_PARTY_NOTICES.md

Credit: Dialer Themer algorithm © lunginspector / jailbreak.party (Erosion, GPL v3). No Erosion IPA binary was copied.

2. Clear Collections

What it does. Ports Pocket Poster's "Reset Collections" under the name Clear Collections. It calls IPSettingsUtilities setLanguage: with the current system language so PosterBoard rebuilds its collections. Existing wallpapers are kept. Use it when Apply fails because a file already exists, or a newly applied wallpaper does not appear.

How to use it. Tools → Customization → Wallpapers → Clear Collections (bottom section, red). Confirm the alert.

Files added

  • Logic lives in the wallpaper settings changes below (no standalone Swift file)
  • WALLPAPER_CLEAR_VIDEOS.md (short usage note, shared with Videos)

Files changed

  • GestaltX/CustomizationViews.swift — Clear Collections button, confirmation alert, and footer copy
  • GestaltX/CustomizationStore.swift — clearCollections() and related store APIs

Credit: Pocket Poster by leminlimez (GPL v3).

3. Videos wallpapers

What it does. Ports Pocket Poster's Videos feature. You pick up to 5 videos, see a muted looping preview, duration, and a Loop Back and Forth toggle, then generate CollectionsPoster descriptors from the bundled Resources/VideoCAML template (JPEG frames, capped at 30 fps / 2796 px, CAKeyframeAnimation on contents). The pack is imported as a normal wallpaper pack named "Video Wallpaper <date>" and applied through GestaltX's existing worse_query PosterBoard pipeline (not Pocket Poster's app-hash symlink path).

How to use it. Tools → Customization → Wallpapers → Videos.

  • Choose Videos (Photos picker), up to 5 clips
  • Default limit is 12 seconds; Ignore 12-Second Limit raises it to 60 seconds (larger wallpapers, may fail to load in PosterBoard)
  • Create & Apply builds the pack and applies it immediately
  • Save to Wallpaper List only creates the pack; apply it later from Wallpaper Settings
  • If a wallpaper does not appear, use Clear Collections, then restart PosterBoard or respring

Files added

  • GestaltX/WallpaperVideos.swift
  • GestaltX/WallpaperVideosView.swift
  • GestaltX/Resources/VideoCAML/** (descriptor template; listed in explicitFolders so the folder hierarchy is preserved)
  • GestaltX/Licenses/Pocket-Poster-GPL-3.0.txt
  • WALLPAPER_CLEAR_VIDEOS.md

Files changed

  • GestaltX/CustomizationViews.swift — Videos entry in Wallpaper Settings and import/apply flow
  • GestaltX/CustomizationStore.swift — wallpaper install / restore helpers used by the new flow
  • GestaltX/AboutView.swift — Pocket Poster credit
  • GestaltX.xcodeproj/project.pbxproj — explicitFolders for Resources/VideoCAML only (marketing version and build number are unchanged)
  • GestaltX/Licenses/ThirdPartyNotices.txt, THIRD_PARTY_NOTICES.md

Credit: Pocket Poster by leminlimez and contributors (GPL v3), template from Pocket Poster commit fb07aa4. GestaltX-side changes include async AVFoundation loading, orientation via CGImagePropertyOrientation, and the 30 fps / 2796 px caps.

4. Bug fixes

Restore Original after Delete. If a wallpaper pack folder was already deleted, leftover WallpaperInstallations records were not consumed, so Restore Original did not uninstall those descriptors. Restore Original now also clears those orphan records.

Videos duration false rejects. Non-finite AVAsset durations (indefinite/NaN) were treated as "too long". They are now treated as unreadable, with a fallback to the video track time range.

Post-apply Videos crash. LoopingVideoPlayer is torn down before picked files are deleted; stop() releases the player item and layer; extracted frames are capped so long clips cannot OOM.

Video import retry duplicates. If a Videos import succeeds but Apply fails or is cancelled, the queued clips are discarded and the user is told the pack was already saved, so a retry cannot create a duplicate.

CI compile fix. CustomizationViews already called hasRestorableWallpapers / restoreOriginalWallpapers; the missing CustomizationStore methods were added so the project compiles.

Theme zip import. Recursively find TelephonyUI-8/9/10 inside wrapped zip folders.

Dead code. Removed unused DialerKeyID.matchToken.

Files changed: GestaltX/CustomizationStore.swift, GestaltX/CustomizationViews.swift, GestaltX/WallpaperVideos.swift, GestaltX/DialerThemerManager.swift.

Commits (3, oldest first)

Relative to current upstream/main (311f789, including Turkish translation #159 and the README typo fix #158):

  1. 9b38fa2 Add Dialer Themer ported from Erosion into GestaltX
  2. d59c8eb Add Clear Collections and Videos to Wallpaper Settings
  3. 11eeb41 Fix wallpaper Restore after Delete and Videos import issues

Mergeability

The branch is based on current huami1314/GestaltX main and can merge cleanly (git merge-tree exit 0, no conflicts). It is 3 commits ahead and 0 commits behind.

Notes for the maintainer

  • Marketing version and build number are left at upstream's 1.1.1 / 11140102. Changelog files are unchanged. Please assign the release version you prefer.
  • .github/workflows is unchanged.
  • GXCustomizationAccess is existing code with a scoped extension: a new resolveDataContainer(for:) API and a slightly broader openApplication allow-list (launch identifiers such as Phone). Worth a careful review.
  • Short usage notes are in DIALER_THEMER.md and WALLPAPER_CLEAR_VIDEOS.md.

Port Erosion's keypad theme importer/applier so Phone dial pad keys
can be themed from Tools → Customization → Dialer Themer, without a
second app.

- Import a TelephonyUI-8/9/10 theme zip (including zips that wrap
  those folders), preview the 12 keys, apply, and Restore Original
- resolveDataContainer(for:) to find the Phone container
- openApplication allows launch identifiers (Phone) so the user can
  jump back to the themed app
- Credit Erosion Dialer Themer in third-party notices
Ports Pocket Poster's Reset Collections (shown as Clear Collections)
and Videos wallpapers into Tools → Customization → Wallpapers.
Videos are converted with the bundled VideoCAML template into
CollectionsPoster descriptors, imported as a normal wallpaper pack,
and applied through GestaltX's existing worse_query PosterBoard
pipeline.

Also add the CustomizationStore Restore Original APIs the wallpaper
settings screen already calls, so the project compiles.

Credits Pocket Poster (leminlimez, GPL-3.0).
- Restore Original after Delete also consumes leftover installation
  records whose pack folder is already gone, so those descriptors
  are actually uninstalled
- Videos no longer treat an unreadable (non-finite) duration as
  "too long"; fall back to the video track time range
- Tear down LoopingVideoPlayer before deleting picked files, release
  the player item and layer in stop(), and cap extracted frames so
  long clips cannot OOM
- If a Videos import succeeds but Apply fails or is cancelled,
  discard the queued clips and tell the user the pack was already
  saved, so a retry cannot create a duplicate
- Remove unused DialerKeyID.matchToken
@huami1314
huami1314 merged commit 971e9dd into huami1314:main Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants