Question

I'm writing a Twitter app for Mac OS X. I want to show emoji (people sent them on their iOS devices) in NSTextView. Is this possible on the Mac? If so, how can I achieve this?

Thank you in advance. Any help would be appreciated.

Kai

Was it helpful?

Solution

Emoji will be featured in lion.

OTHER TIPS

Note that iOS and Mac OS X Lion use different unicode code points to represent the same emoji character.

The iOS unicode values are documented here: http://pukupi.com/post/1964/ while the Mac OS X Lion ones are documented here: http://www.unicode.org/~scherer/emoji4unicode/snapshot/emojidata.pdf (actually both are documented in that .pdf. OS X 10.7 Lion uses the proposed Unicode standard encoding, while iOS 5 uses the SoftBank column.)

For example, a simple smiley face is  i.e. \xe415 on iOS but it is 😄 \x1f604 on Mac OS. You can verify this by looking at this page on both operating systems.

You should be able to do this by searching the string for all occurrences of emoji and replacing them with instances of a custom NSTextAttachment, which draws the appropriate icon inline.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top