CocoaPods trunk is moving to be read-only. Read more on the blog, there are 9 months to go.

SwiftEmojiPicker 2.2.1

SwiftEmojiPicker 2.2.1

Maintained by Sergey Likhanov.



  • By
  • Sergey Likhanov

SwiftEmojiPicker

Version License Platform

About

A native SwiftUI emoji picker for iOS and macOS — macOS-style popover, zero UIKit dependencies.

Works on iOS 14+ and macOS 11+ with a single .emojiPicker() modifier.

Fork of MCEmojiPicker, rewritten from the ground up in pure SwiftUI to resolve the lack of macOS support.

Limitations

  • Does not support two-part emojis. For example:
    • Supported: 🤝🏻 🤝🏿
    • Not supported: 🫱🏿‍🫲🏻 🫱🏼‍🫲🏿

Navigation

Requirements

  • Swift 5.9+
  • iOS 14.0+
  • macOS 11.0+

Installation

Swift Package Manager

In Xcode go to File → Add Package Dependencies and enter:

https://github.com/izyumkin/SwiftEmojiPicker

Or add it to your Package.swift:

dependencies: [
    .package(url: "https://github.com/izyumkin/SwiftEmojiPicker", from: "1.0.0")
]

CocoaPods

pod 'SwiftEmojiPicker'

Manually

Copy the Sources/SwiftEmojiPicker folder into your Xcode project. Enable Copy items if needed and Create groups.

Quick Start

import SwiftEmojiPicker

struct ContentView: View {
    @State private var selectedEmoji = "😀"
    @State private var showPicker = false

    var body: some View {
        Button(selectedEmoji) {
            showPicker = true
        }
        .emojiPicker(isPresented: $showPicker, selectedEmoji: $selectedEmoji)
    }
}

Usage

Tint color

Color for the active category icon. Default is .blue.

.emojiPicker(
    isPresented: $showPicker,
    selectedEmoji: $selectedEmoji,
    selectedEmojiCategoryTintColor: .pink
)

Dismiss after choosing

Whether the picker closes after an emoji is selected. Default is true.

.emojiPicker(
    isPresented: $showPicker,
    selectedEmoji: $selectedEmoji,
    isDismissAfterChoosing: false
)

Embed directly

EmojiPickerView can be placed anywhere in your view hierarchy without a popover:

EmojiPickerView(selectedEmoji: $selectedEmoji)

Localization

🌍 This library supports all existing localizations.

TODO

  • Core emoji selection
  • Dark mode
  • Category tab bar with SF Symbols
  • Automatic filtering of emojis by OS version
  • Skin tone picker
  • Frequently used
  • iOS 14+ and macOS 11+ via pure SwiftUI
  • Search bar