This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import XCPlayground | |
XCPSetExecutionShouldContinueIndefinitely() | |
func getAllEmojis(completion: String? -> ()) { | |
let url = NSURL(string: "http://www.unicode.org/Public/UCD/latest/ucd/EmojiSources.txt")! | |
NSURLSession.sharedSession().dataTaskWithURL(url) { data, response, error in | |
guard let data = data where error == nil else { | |
completion(nil) |