Latest 1.0.3
License MIT
Platforms osx , ios , tvos , watchos
Frameworks Foundation

IDEmojiString is a simple tool to detect emoji in string, and also remove emoji from string.

IDEmojiString detects an emoji by search through full emoji set loaded from emoji.plist. Emoji.plist extracted from, which is the best definition of the full set indicated in


NSString’s existing method - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet; only supports character set in BMP, not supplementary characters. For example:

NSMutableCharacterSet *set = [[NSMutableCharacterSet alloc] init];
[set addCharactersInString:@"2️⃣"];      // keycap 2, 0032 FE0F 20E3, github seems not supporting this emoji. Check from 
[@"2" rangeOfCharacterFromSet:set];     // return value: YES, which is not reasonable 

Existing library does not solve emoji perfectly. NSString+RemoveEmoji category, which quoted by many articles, does not detect emoji such as @"⭐", and detects character such as @"Ⅶ" which is not emoji. Test here


#import "IDEmojiManager.h"

IDEmojiManager *manager = [[IDEmojiManager alloc] init];
BOOL containsEmoji = [manager containEmojiInString:@"Some String⭐"];  // return value: YES
NSString *str = [manager removeEmojiFromString:@"Some String⭐"];      // return value: Some String


Use CocoaPods.

pod 'IDEmojiString'


If you found a bug, open an issue.


IDEmojiString is released under the MIT license. See LICENSE for details.

Latest podspec

    "name": "IDEmojiString",
    "version": "1.0.3",
    "summary": "A libarary that detects and removes Emoji.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Ian Dai": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.3"
    "source_files": "IDEmojiString/*{h,m}",
    "exclude_files": "IDEmojiString/main.m",
    "resources": "IDEmojiString/emoji.plist",
    "frameworks": "Foundation",
    "platforms": {
        "osx": null,
        "ios": null,
        "tvos": null,
        "watchos": null

Pin It on Pinterest

Share This