I need to fetch ‘Address book person’s online/off-line status’ through objective C on Mac.
I need ‘iChat service’ whatever Address book has used to fetch online status of a Person.
Can anyone help me how can I get this though code.
Thanks in Advance.
Use
InstantMessage.frameworkto find the status of the current user’s buddies.Specifically, it sounds like you want to call
-[IMService screenNamesForPerson:]and pass the ABPerson you want to find the status of, then call-[IMService infoForScreenName:]on each returned name.Inspect the returned dictionary’s
IMPersonStatusKeyvalue to check the status manually, or call+[IMService imageNameForStatus:]on the value to get the name of an image you can display to indicate the status (the red or green “bubble” used in Mail.app, Contacts.app, and Calendar.app).