Coder Social home page Coder Social logo

imessagemodule's Introduction

Node iMessage Module

Requires OS X 10.7 or better, and an active iMessage account

What is this?

This is a node module that allows you to send iMessages, assuming you are running on a Mac that's signed in to an iMessage account.

How do I use it in my project?

Like this:

var imessagemodule = require("iMessageModule");

imessagemodule.sendMessage("recipient email, phone, or chat title", "message text", function(err) {});

It's really that simple! And you can send the messages as quickly as you like. iMessageModule will queue up them and send them as quickly as Messages.app will allow.

What's the purpose?

Nothing else on npm seems to deal with group chats correctly. I wanted something to use in my own project that I believed worked reliably and as quickly as possible. This uses a combination of private OS X frameworks in MessagesKit that I figured out while working on nodeprivatemessageskit and AppleScript files to send messages. Should work with OS X 10.7 or better.

Why doesn't this handle reading the database?

There's already a pretty good library for that on npm at imessage but personally I just read the Messages SQLite database directly in my other projects at imessageclient, iMessageWebClient, and imessagebot.

This is clunky!

This is using some private APIs with in OS X, but could be improved to use more. Private APIs within OS X should be able to be used to completely send messages without the use of Messages.app, but I haven't figured out how to do so yet. Right now I am using some private APIs to open a new message window and prefilling the To: field. Maybe you can help out and contribute? Check out nodeprivatemessageskit for more info.

imessagemodule's People

Contributors

camhenlin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.