feat: add typing indicator support via IMCore private framework#41
Merged
steipete merged 3 commits intosteipete:mainfrom Feb 16, 2026
Merged
feat: add typing indicator support via IMCore private framework#41steipete merged 3 commits intosteipete:mainfrom
steipete merged 3 commits intosteipete:mainfrom
Conversation
|
lgtm, @steipete good to merge? |
Owner
|
Does that work without disabling SIP? |
Implements typing indicators for outgoing messages using runtime dynamic loading of Apple's IMCore private framework. This is the only way to programmatically send typing indicators — AppleScript has no equivalent capability. Closes steipete#22 Changes: - IMsgCore: Add TypingIndicator struct with start/stop/duration APIs - CLI: Add 'imsg typing' command with --to, --duration, --stop flags - RPC: Add typing.start and typing.stop methods - Errors: Add typingIndicatorFailed error case Usage: imsg typing --to +14155551212 imsg typing --to +14155551212 --duration 5s imsg typing --to +14155551212 --stop true imsg typing --chat-identifier "iMessage;-;+14155551212"
6488f85 to
6cd7238
Compare
Owner
Owner
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.
Summary
Implements typing indicators for outgoing messages (closes #22) using runtime dynamic loading of Apple's IMCore private framework. This is the only way to programmatically send typing indicators — AppleScript has no equivalent capability.
What's included
1.
IMsgCore—TypingIndicatorstructstartTyping(chatIdentifier:)— show the "..." typing bubble on the recipient's devicestopTyping(chatIdentifier:)— dismiss the typing bubbletypeForDuration(chatIdentifier:duration:)— show for N seconds, then auto-stopdlopento load/System/Library/PrivateFrameworks/IMCore.frameworkat runtimeIMDaemonController, resolves chat viaIMChatRegistry, then calls[IMChat setLocalUserIsTyping:]2. CLI —
imsg typingcommandSupports all the same chat targeting as
send:--to,--chat-id,--chat-identifier,--chat-guid.3. RPC —
typing.start/typing.stopmethods{"jsonrpc":"2.0","id":1,"method":"typing.start","params":{"to":"+14155551212"}} {"jsonrpc":"2.0","id":2,"method":"typing.stop","params":{"to":"+14155551212"}}Also supports
chat_identifier,chat_guid,chat_id, andserviceparams.How it works
The implementation uses the same approach as BlueBubbles — loading IMCore at runtime via
dlopen/objc_getClass/sel_registerName. The core call is:No new dependencies are required. The private framework is available on all macOS versions that support Messages.app.
Files changed
Sources/IMsgCore/TypingIndicator.swiftSources/IMsgCore/Errors.swifttypingIndicatorFailederror caseSources/imsg/Commands/TypingCommand.swiftSources/imsg/CommandRouter.swifttypingcommandSources/imsg/RPCServer.swifttyping.start/typing.stopRPC methodsCaveats
send).Testing
swift buildpasses with zero errors and zero warningsimsg typing --to <number>shows the typing bubble on the recipient's iPhoneTestingframework issue on non-Xcode-16 environments)