Emoji in Swift. For reference, go to https://github.com/onmyway133/emoji
- Support emoji sequences
- Handle skin tones, marks, genders, variation selectors
- Support new iOS emojis
Smile.list()
emojiList
emojiCategories
Smile.isEmoji(character: "π") // true
Smile.containsEmoji(string: "π and π") // true
XCTAssertEqual(Smile.emoji(unicodeValues: [0x1F47B]), "π»")
XCTAssertEqual(Smile.emoji(unicodeValues: [0x0001F468, 0x200D, 0x2708]), "π¨ββ")
Smile.unmodify(emoji: "π¨πΏ") // π¨
Smile.name(emoji: "π³π΄") // ["REGIONAL INDICATOR SYMBOL LETTER N", "REGIONAL INDICATOR SYMBOL LETTER O"])
Smile.emojis(keywords: ["GRINNING"]) // π, πΈ
Smile.emoji(countryCode: "no") // π³π΄
Emoji data is from https://github.com/github/gemoji/blob/master/db/emoji.json
Smile.emoji(alias: "japanese_castle") // π―
Smile.alias(emoji: "π―") // japanese_castle
Smile.replaceAlias(string: ":santa: is coming to :european_castle:") // π
is coming to π°
Emoji data is from https://github.com/github/gemoji/blob/master/db/Category-Emoji.json
Smile.category(emoji: "π") // people
Smile.extractEmojis(string: "Find πandπ") // ππ
Smile.removeEmojis(string: "Find πandπ") // Find and
Smile.assemble(emojis: ["π¨", "π«") // π¨βπ«
Smile.assemble(emojis: ["π¨", "π©", "π§", "π¦"] // π¨βπ©βπ§βπ¦
Smile.disassemble(emoji: "π¨βπ«") // [π¨, π«]
Update emoji list by running
node parser.js
Smile is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Smile'
Smile is also available through Carthage. To install just write into your Cartfile:
github "onmyway133/Smile"
Khoa Pham, onmyway133@gmail.com
We would love you to contribute to Smile, check the CONTRIBUTING file for more info.
Smile is available under the MIT license. See the LICENSE file for more info.