Skip to content

Instantly share code, notes, and snippets.

View skydivedan's full-sized avatar

Dan Morrow skydivedan

View GitHub Profile
@daehn
daehn / Searchable.swift
Last active April 23, 2019 03:05
Swift protocols and protocol extensions to easily add and delete conforming instances to Spotlight. Blog post can be found here: http://silvandaehn.com/2015/09/25/Simplifying-CoreSpotlight/
import UIKit
import CoreSpotlight
import MobileCoreServices
public typealias Completion = NSError? -> Void
// MARK: - Searchable Protocol
public protocol Searchable {
static var spotlightDomainIdentifier: String { get }