Please note that this isn't actually using the iMessage protocol, this just uses AppleScript to fire messages via Messages.app. However, it's nice to finally be able to iMessage over SSH. :)
That's correct. In the future, if time permits, I would like to figure out how to use private APIs within OS X or the Messages.app libraries to send messages without the AppleScript files. Unfortunately that's non-trivial and takes some serious poking around. Right now it's a useful solution for me over ssh so I wanted to share it with the community since I thought others might find that ability useful as well
Regardless of the actual repository (though don't get me wrong, this is still super cool and I like seeing AppleScript in action since I feel like it's criminally underused), this kind of thing in a Readme always brings a grin to my face. Tinkering for tinkering's sake is the best.
If it could be ingrated with [WeeChat] [1], it could be a way to provide iMessage support as a [web browser chat client] [2] and to [Android devices] [3].
I know I'll sound like I am an old man yelling "Get off my lawn!", but as far as I can tell this is a text-mode application but it is not a commandline interface. Note that it's only the HN submission title that gets it wrong, the Readme.md on GitHub correctly calls it "terminal-based" rather than CLI.
An actual commandline interface would also be cool, to be able to easily send iMessages from shell scripts, for example.
Sure, you're right, I just got excited typing out the title :) You could actually use the AppleScript files in the repo to send messages directly without the use of the rest of the code. Usage would be like this:
osascript sendmessage_single.AppleScript PHONE_NUMBER_OR_ICLOUD_EMAIL "my message text" false false
ive played with this similar before capturing incoming. as well you can write events for messsages in javascript just now with yosemite the same as you would applescript. you can use osacompile and osascript command tools to run and compile javascript/applescript. the same things applescript can do. i find easier to write. doesnt have to be complicated to run for personal use inside ssh.
Hi, op here, I'm actually working on a hosted solution right now making use of a set of physical Macs and fast user switching. Hoping to have something to show for it in the next several weeks!
I think this is one of those projects we all think about doing, then realize an Apple ID is way too critical to a Mac / iPhone user's security (remote wipe anyone?) to let a third party authenticate with it.
It would be really handy as something I could run on my own mac.
Yeah, the service will essentially be a man in the middle on the account, and I believe it will be very important to communicate that with users. I'll think about releasing a standalone "server" app based on the code although I've already built something somewhat similar (although even "clunkier" if you can imagine that) here: https://github.com/CamHenlin/imessageservice
> Yeah, the service will essentially be a man in the middle on the account, and I believe it will be very important to communicate that with users.
No, it will be very important not to do it, because you are knowingly busting security open on Apple IDs with your service and think that educating users is the best way to mitigate that. We all know most of your users won't know any better. The better way to mitigate it is to not accept Apple IDs in the first place.
If you launch that service, I would feel obligated to tip off the iCloud folks that you're knowingly compromising Apple IDs. That isn't because I want to see you fail, but because you are compromising Apple IDs and your users are caught in the middle.
This is an idea you should let go. I know that sucks to hear.
I generally hate posts that are just a +1 to something, but I feel your point is important enough that it needs echoing. I as well will do the same as you if I see a service like this.
I've found during my own research that running an OS X VM sending out iMessages for too long will eventually get itself and its host machine blacklisted from iCloud services for a few days. Not sure how they detect the host but I can cause it consistently. I think the VM is blacklisted by its bad SN
No, sorry; I stopped using iMessage because it wasn't worthwhile to integrate with a system that didn't approve of my use. But when you get cut off, there's no explicit indication, the messages are just not delivered, I think I stopped getting indications that people were on iMessage (the green? bubbles) as well.
Yeah that's what I've come up with in my testing as well. It's kind of surprising that there isn't more research into it. Just all of the sudden iMessages stop sending, then a few days later they magically start sending again
I never actually experienced any rate limiting/blacklisting issues while I ran it. I even tested spamming messages to myself, it worked but upset my iOS notifications a fair bit maybe I just got lucky.