Repository navigation
Conversation
…utable)
Music Haptics did nothing under LiveContainer while Vibrations > Controls
worked: the Taptic Engine was available and the switch was on, but Spotify's
audio output was never tapped, so the analyzer had no sound to follow.
SGRebindImport only ever scanned the main executable (filetype MH_EXECUTE).
A container runs the host app as the executable and loads Spotify as a dylib,
so Spotify's import slot for AudioOutputUnitStart was never in scope and the
rebind always failed ("audio pipeline: Spotify output import unavailable").
It now walks every loaded image, skipping only the mod's own dylibs, which
also repairs the ConnectDiscovery sendto/sendmsg rebinds that shared the
main-executable-only assumption.
On top of that, the pipeline no longer locks a failed install in for the
whole launch (dispatch_once -> retry until the rebind succeeds), and Music
Haptics recovers instead of staying dead: the switch state and player thread
are set up before registration, a failed CHHapticEngine is discarded and
rebuilt, the capability is re-checked rather than cached, the engine falls
back to one built without Spotify's audio session, and registration is retried
on the first foreground. A startup line now states which part is missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Music Haptics did nothing under LiveContainer, while Vibrations > Controls worked fine. The device log made it exact:
The Taptic Engine was available and the switch was on — but Spotify's audio output was never tapped, so the analyzer had no sound to follow. This is the "permission issue" reported for containers: it is not a TCC permission, it is the container's process layout.
Root cause
SGRebindImportonly ever scanned the main executable (filetype != MH_EXECUTE -> continue). A container runs the host app as the executable and loads Spotify as a dylib, so Spotify's import slot forAudioOutputUnitStartwas never in scope and the rebind always failed. No audio tap -> no analysis -> no haptics.Changes
Core/SGRebind.m— walk every loaded image for the symbol instead of the main executable alone, skipping only the mod's own dylibs. This also repairs theShared/ConnectDiscoverysendto/sendmsgrebinds, which shared the same main-executable-only assumption.Shared/Audio/SGAudioPipeline.x—install()no longer usesdispatch_once, which locked a failure in for the whole process when Spotify's image was not loaded yet; it now retries until the rebind succeeds.Shared/Haptics/MusicHaptics.x— recover instead of staying dead:CHHapticEngineis discarded and rebuilt rather than kept forever;sg_activeis seeded fromapplicationState.Diagnostics/Diagnostics.x— one startup line stating which part is missing (switch … Taptic Engine … Spotify's output tapped|not tapped yet|untappable), since this feature previously had several silent ways to do nothing.Verification
scripts/check-layers.shpasses (the Diagnostics addition declares its two symbols locally rather than importing across layers).Only source files are touched — no IPA,
.deb, or other build output.