Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Create a custom SlackKit client.


Swift Package Manager Add SlackKit as a dependency to your Package.swift and specify SKClient as a target dependency:
import PackageDescription
let package = Package(
    name: "SampleApp",
    products: [
            name: "SampleApp",
            targets: ["SampleApp"]),
    dependencies: [
        .package(url: "", .upToNextMinor(from: "4.3.0")),
    targets: [
            name: "SampleApp",
            dependencies: ["SKClient"])
Carthage Add SlackKit to your Cartfile:
github "pvzig/SlackKit"

and run

carthage bootstrap

Drag the built SKClient.framework and it's dependency SKCore.framework into your Xcode project.

CocoaPods Add SKClient to your Podfile:
pod 'SlackKit/SKClient'


To use the library in your project import it:

Carthage & SPM

import SKClient


import SlackKit

The Basics

Subclass Client to create a custom SlackKit client.

class MyClient: Client {

    override func notificationForEvent(_ event: Event, type: EventType) {

	override func initialSetup(JSON: [String: Any]) {

Pass your custom client to SlackKit when adding an RTM bot:

let bot = SlackKit()
bot.addRTMBotWithAPIToken(“xoxb-SLACK_AUTH_TOKEN”, client: MyClient())
You can’t perform that action at this time.