Latest 1.3.0
Homepage https://github.com/onmyway133/Smile
License MIT
Platforms ios 8.0, osx 10.9, tvos 9.2, requires ARC
Authors

Emoji in Swift. For reference, go to https://github.com/onmyway133/emoji

CI Status
Version
Carthage Compatible
License
Platform
Swift

Features

  • [x] Support emoji sequences
  • [x] Handle skin tones, marks, genders, variation selectors
  • [x] Support new iOS emojis

List

List all emojis

Smile.list()
emojiList
emojiCategories

Emoji

Check if a character is emoji

Smile.isEmoji(character: "🎉") // true

Check if a string contains any emoji

Smile.containsEmoji(string: "🎈 and 🎁") // true

Get emoji from unicode values

XCTAssertEqual(Smile.emoji(unicodeValues: [0x1F47B]), "👻")
XCTAssertEqual(Smile.emoji(unicodeValues: [0x0001F468, 0x200D, 0x2708]), "👨‍✈")

Unmodify an emoji

Smile.unmodify(emoji: "👨🏿") // 👨

Name

Show standard name of an emoji

Smile.name(emoji: "🇳🇴") // ["REGIONAL INDICATOR SYMBOL LETTER N", "REGIONAL INDICATOR SYMBOL LETTER O"])

Search emoji by keywords

Smile.emojis(keywords: ["GRINNING"]) // 😁, 😸

Flag

Search emoji flag by country code

Smile.emoji(countryCode: "no") // 🇳🇴

Alias

Search emoji by alias

Emoji data is from https://github.com/github/gemoji/blob/master/db/emoji.json

Smile.emoji(alias: "japanese_castle") // 🏯

Find alias by emoji

Smile.alias(emoji: "🏯") // japanese_castle

Replace alias within a string

Smile.replaceAlias(string: ":santa: is coming to :european_castle:") // 🎅 is coming to 🏰

Category

Find category of emoji

Emoji data is from https://github.com/github/gemoji/blob/master/db/Category-Emoji.json

Smile.category(emoji: "😁") // people

Manipulation

Extract all emojis within a string

Smile.extractEmojis(string: "Find 🔑and🔎") // 🔑🔎

Remove all emojis within a string

Smile.removeEmojis(string: "Find 🔑and🔎") // Find and

Assemble

Smile.assemble(emojis: ["👨", "🏫") // 👨‍🏫
Smile.assemble(emojis: ["👨", "👩", "👧", "👦"] // 👨‍👩‍👧‍👦

Disassemble

Smile.disassemble(emoji: "👨‍🏫") // [👨, 🏫]

Script

Update emoji list by running

node parser.js

Installation

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"

Author

Khoa Pham, [email protected]

Contributing

We would love you to contribute to Smile, check the CONTRIBUTING file for more info.

License

Smile is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Smile",
    "summary": "Emoji in Swift",
    "version": "1.3.0",
    "homepage": "https://github.com/onmyway133/Smile",
    "license": "MIT",
    "authors": {
        "Khoa Pham": "[email protected]"
    },
    "source": {
        "git": "https://github.com/onmyway133/Smile.git",
        "tag": "1.3.0"
    },
    "social_media_url": "https://twitter.com/onmyway133",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "tvos": "9.2"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0"
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This