@spectrum-ts/imessage
v12.8.0
Published
iMessage provider for spectrum-ts.
Readme
@spectrum-ts/imessage
iMessage provider for spectrum-ts, including tapbacks, special effects, polls, and iMessage Apps.
Install
bun add spectrum-ts @spectrum-ts/imessageUse
import { Spectrum } from "spectrum-ts";
import { imessage } from "@spectrum-ts/imessage";
const spectrum = Spectrum({
providers: [imessage.config()],
});This package also exports the iMessage-specific content helpers effect, read, background, customizedMiniApp, and nativeContactCard.
nativeContactCard() shares the bot account's own contact card (Apple's "Share Name and Photo") with a chat — remote mode only:
import { nativeContactCard } from "@spectrum-ts/imessage";
await space.send(nativeContactCard());
// or the sugar form, typed on the iMessage space:
await space.shareContactCard();See the spectrum-ts documentation for the full guide.
For direct access to the local macOS Messages database, install and import
@spectrum-ts/imessage-local separately. The local provider is intentionally
not included in the batteries-included spectrum-ts package.
bun add @spectrum-ts/imessage-local