Effortless emoji-querying in Swift

Related tags

Text EmojiKit
Overview

EmojiKit

EmojiKit is a simple emoji-querying framework in Swift. It is used in Paste, an Emoji Search app in the App Store.

Installation

If you’re using Carthage, add EmojiKit to your Cartfile:

github "dasmer/EmojiKit"

Otherwise, if you're using CocoaPods, add EmojiKit to your Podfile:

pod 'EmojiKit', '~> 0.0.1'

Usage

1. Create an EmojiFetcher instance variable.
let fetcher = EmojiFetcher()
2. Use EmojiFetcher's query function to get an array of Emoji structs that match the given search string.
fetcher.query("food") { emojiResults in
  for emoji in emojiResults {
    print("Current Emoji: \(emoji.character) \(emoji.name)")
  }
}

Contributing

The best way to contribute is by submitting a pull request. You can also submit a new Github issue if you find bugs or have questions. :octocat:

Please make sure to follow the general coding style and add test coverage for new features!

You might also like...
Marky Mark is a parser written in Swift that converts markdown into native views.
Marky Mark is a parser written in Swift that converts markdown into native views.

Marky Mark is a parser written in Swift that converts markdown into native views. The way it looks it highly customizable and the supported markdown syntax is easy to extend.

Swift Parser Combinators

Parsey Swift Parser Combinator Framework In addition to simple combinators, Parsey supports source location/range tracking, backtracking prevention, a

Great Swift String Pluralize Extension

Pluralize.swift Great Swift String Pluralize Extension case-insensitive tons of rules for irregular nouns (plural form) supports uncountable nouns all

An NSPredicate DSL for iOS, OSX, tvOS, & watchOS. Inspired by SnapKit and lovingly written in Swift.
An NSPredicate DSL for iOS, OSX, tvOS, & watchOS. Inspired by SnapKit and lovingly written in Swift.

PrediKit A Swift NSPredicate DSL for iOS & OS X inspired by SnapKit, lovingly written in Swift, and created by that weird dude at KrakenDev. If you're

PySwiftyRegex - Easily deal with Regex in Swift in a Pythonic way

PySwiftyRegex Easily deal with Regex in Swift in a Pythonic way.

Regular expressions for swift
Regular expressions for swift

Regex Advanced regular expressions for Swift Goals Regex library was mainly introduced to fulfill the needs of Swift Express - web application server

👩‍🎨 Elegant Attributed String composition in Swift sauce
👩‍🎨 Elegant Attributed String composition in Swift sauce

Elegant Attributed String composition in Swift sauce SwiftRichString is a lightweight library which allows to create and manipulate attributed strings

SwiftVerbalExpressions is a Swift library that helps to construct difficult regular expressions

SwiftVerbalExpressions Swift Regular Expressions made easy SwiftVerbalExpressions is a Swift library that helps to construct difficult regular express

A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.

PhoneNumberKit Swift 5.3 framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber. Features F

Comments
  • [Feature] isEmoji method

    [Feature] isEmoji method

    An easy way to check if a string is an emoji.

    Right now I'm using

            let cfstr = NSMutableString(string: String(c)) as CFMutableString
            var range = CFRangeMake(0, CFStringGetLength(cfstr))
            CFStringTransform(cfstr, &range, kCFStringTransformToUnicodeName, Bool(0))
            let str = cfstr as String
    

    to check if a given character is an emoji, but having a method would be awesome:

    if fetcher.isEmoji("✅") {
      // Yeah
    }
    

    If we implement https://github.com/dasmer/EmojiKit/issues/3, we'd get this for free, and could write a simple alias which returns just a boolean.

    What do you think?

    opened by KrauseFx 4
  • [Feature] Searching with a emoji should return this particular Emoji

    [Feature] Searching with a emoji should return this particular Emoji

    let fetcher = EmojiFetcher()
    fetcher.query("🍕") { emojiResults in
     // use result
    }
    

    Would it make sense for emojiResults to contain one element, which is the :pizza: emoji?

    opened by KrauseFx 3
  • You don't have to do that by hand

    You don't have to do that by hand

    Hi, I just come across your repo. It is interesting, but one thing I think you can improve, is that we don't have to hard code those emoji in the file, we just need to manipulate the ranges of Unicode scalar, like https://github.com/onmyway133/Omnia#emoji

    Emoji.flag("NO") // 🇳🇴
    Emoji.standardName("😁") // GRINNING FACE WITH SMILING EYES
    Emoji.search(["GRINNING"]) // ["😁", "😸"]
    Emoji.list()
    
    opened by onmyway133 2
  • Correct the spelling of CocoaPods in README

    Correct the spelling of CocoaPods in README

    This pull requests corrects the spelling of CocoaPods 🤓 https://github.com/CocoaPods/shared_resources/tree/master/media

    opened by ReadmeCritic 0
Releases(0.0.2)
Owner
Dasmer Singh
Dasmer Singh
Emoji in Swift

Smile ❤️ Support my apps ❤️ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut manage

Khoa 478 Dec 30, 2022
A Swift framework for using custom emoji in strings.

Emojica – a Swift framework for using custom emoji in strings. What does it do? Emojica allows you to replace the standard emoji in your iOS apps with

Dan 101 Nov 7, 2022
Swift emoji string parsing library

Croc is a library for parsing emojis on iOS. It provides a simple and lightweight interface for detecting, generating, categorizing and managing emoji

Joe Kalash 125 Sep 27, 2021
A category on NSString to convert Emoji Cheat Sheet codes to their equivalent Unicode characters

NSString+Emojize A category on NSString to turn codes from Emoji Cheat Sheet into Unicode emoji characters. Getting Started In order to use NSString+E

DIY.org 643 Sep 8, 2022
A searchable emoji dropdown view.

NBEmojiSearchView Integrate a searchable emoji dropdown into your iOS app in just a few lines. To start searching, the user just types a :. Then, the

Neeraj Baid 85 Dec 23, 2022
A simple library that provides standard Unicode emoji support across all platforms

Twitter Emoji (Twemoji) A simple library that provides standard Unicode emoji support across all platforms. Twemoji v13.1 adheres to the Unicode 13.0

Twitter 15k Jan 8, 2023
The world's largest independent emoji font.

The world's largest independent emoji font.

JoyPixels Inc. 337 Dec 24, 2022
BonMot is a Swift attributed string library

BonMot (pronounced Bon Mo, French for good word) is a Swift attributed string library. It abstracts away the complexities of the iOS, macOS, tvOS, and

Rightpoint 3.4k Dec 30, 2022
Fully open source text editor for iOS written in Swift.

Edhita Fully open source text editor for iOS written in Swift. http://edhita.bornneet.com/ What Edhita means? Edhita (Romaji) == エディタ (Katakana) == Ed

Tatsuya Tobioka 1.2k Jan 1, 2023
A simple and customizable Markdown Parser for Swift

MarkdownKit MarkdownKit is a customizable and extensible Markdown parser for iOS and macOS. It supports many of the standard Markdown elements through

Bruno Oliveira 687 Dec 18, 2022