Skip to content

feat: move Device Spoof into the tweak catalog as a staged tweak - #75

Merged
gievano merged 1 commit into
mainfrom
feat/device-spoof-catalog-tweak
Aug 25, 2026
Merged

gievano merged 1 commit into
mainfrom
feat/device-spoof-catalog-tweak

Conversation

@gievano

@gievano gievano commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Device Spoof now lives in the tweak catalog as a tile that behaves 1:1 like the Device Artwork Subtype tweak: tap toggles it, the wheel picker expands inline under its row, and the change is applied through the shared staged batch flow instead of an instant per-view Apply button.
  • Picker options are derived from DeviceSpoofingManager.targets so they can never drift; index 0 ("None (Real Identity)") is a no-op.
  • GestaltStore.apply routes this tweak to DeviceSpoofingManager.apply after the generic modification pass (the full identity blast spans ~20 CacheExtra keys plus ArtworkDevice entries and name keys that must not be invented), before any disk write - manager failures abort loudly with the pristine backup intact.
  • New tweak id (devicespoof) so stale persisted indices from the old 11-option ProductType picker cannot mis-map onto the new target list.
  • Deleted the standalone DeviceSpoofingView, the orphaned applyDeviceSpoof(), and dead manager helpers (changedKeyCount, currentTarget, realMachineIdentifier, verify, clearDeviceNames). Net -245 lines.

Test plan

  • CI builds the unsigned IPA (Xcode archive is the compile check; no swiftc locally).
  • On device: Device Spoof tile appears in the Device category, tap expands the wheel picker inline.
  • Select a target, stage, apply via "Apply N changes" - identity keys spoof, respring applies it.
  • Toggle off + apply leaves other tweaks working; restore pristine backup reverts the spoof.

Replace the hidden product-type tweak and the standalone DeviceSpoofing
tool page with a single catalog tile that behaves 1:1 like the Device
Artwork Subtype tweak: tap toggles it, the wheel picker expands inline
under its row, and the full identity blast is written through the shared
staged apply flow.

- Picker options derive from DeviceSpoofingManager.targets so the list
  never drifts; index 0 keeps the real identity.
- GestaltStore.apply routes the devicespoof tweak to DeviceSpoofingManager
  after the generic pass (its write-set spans ~20 CacheExtra keys plus
  ArtworkDevice entries that plain modifications cannot express) and runs
  before any disk write, so manager failures abort loudly.
- New tweak id avoids mis-mapping stale persisted picker indices from the
  old 11-option ProductType picker.
- Remove DeviceSpoofingView and dead manager helpers (changedKeyCount,
  currentTarget, realMachineIdentifier, verify, clearDeviceNames).
@gievano
gievano merged commit 5c37748 into main Aug 25, 2026
3 checks passed
@gievano
gievano deleted the feat/device-spoof-catalog-tweak branch August 25, 2026 20:36
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.

1 participant