Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 5.0 Check if NSString contains Emoji characters

I have an iOS 5 application that allows users to enter username with international keyboards. I want to check if the input (NSString *) contains an emoji character or not.

Disabling emoji keyboard is not an option (Using UIKeyboardTypeASCIICapable as it disables some of the international keyboards).

I tried this. But it does not detect some of the characters like these.

Is there a good way to solve this problem?

like image 315
CÇ. Avatar asked Sep 19 '12 04:09

CÇ.


1 Answers

I was able to detect all emojis in iOS 5 and iOS 6 emoji keyboards using following method https://gist.github.com/4146056

like image 71
CÇ. Avatar answered Dec 09 '22 18:12

CÇ.