I have a textview that can contain multiple words and emoji's. However, I've noticed that some emoji's can crash my app
How I'm currently handling emoji's:
let data: NSData = myTextView.dataUsingEncoding(NSNonLossyASCIIStringEncoding)!
let valueUnicode: NSString = NSString(data: data, encoding: NSUTF8StringEncoding)!
Sometimes I get this error: "Invalid hex digit in unicode escape sequence around character 273."
The reason why I'm encoding is because I'm using json to store the textview into my db and later on I'm pulling it back down from the db