objectiveccoder001
objectiveccoder001

Reputation: 3031

Instant Messenger API

I need just a simple Objective-C app or API that can send and receive IMs to a single user.

BARE BONES.

I've looked at Skype, but the Objective-C part looks really outdated. AIM is preferred, but anything that can send and receive IMs is perfect.

Is there an API for this? For AIM or Skype?

Examples would be appreciated, and remember, I'm totally new to Obj-C.

Upvotes: 0

Views: 1878

Answers (4)

Alex Nichol
Alex Nichol

Reputation: 7510

I am currently working on an Objective-C implementation of the OSCAR (AIM) protocol. It is being updated on GitHub. If I understand what you want to do correctly, the library, although incomplete, will meet your needs. It can send and receive messages, and work with status messages. It can also read the buddy list if you are interested in that. The entire library should be finished by the end of the month, and you can check it out on GitHub:

https://github.com/unixpickle/LibOrange

Signing on is this simple:

 login = [[AIMLogin alloc] initWithUsername:username password:password];
 [login setDelegate:self];
 if (![login beginAuthorization]) {
     NSLog(@"Failed to start authenticating.");
     abort();
 }

Once signed on, sending messages works like this:

 AIMMessage * reply = [AIMMessage messageWithBuddy:[message buddy] message:@"Test"];
 [theSession.messageHandler sendMessage:reply];

Obviously, you can check out the sample on GitHub, but I thought I would put that sample code to wet your appetite. Enjoy!

Upvotes: 2

sj660
sj660

Reputation: 81

I don't know exactly how hard it would be to use, but isn't there an open source library for accessing IMs called libPurple? maybe you should check that out and see what it can do in Xcode.

Upvotes: 1

Chris Frederick
Chris Frederick

Reputation: 5584

I don't know about simple or bare bones, but Adium is a good open-source IM client for OS X written in Cocoa.

UDPATE: You might want to check out this blog post ("Towards an Open Source XMPP Framework for Cocoa"). It looks like the author wanted his own Jabber/XMPP Cocoa framework, too, and has even created a project for it in Google Code.

Upvotes: 3

Marc Charbonneau
Marc Charbonneau

Reputation: 40515

If it's for a small scale deployment, it would be pretty easy to roll your own using Distributed Objects. I've heard it can be problematic trying to use DO for a high traffic Internet service though.

Upvotes: 0

Related Questions