How can I open the Messages app to the compose screen, with the message body preloaded with specific text?
Thanks to @Jatin for finding the openSystemURL(url: NSURL)
function.
Here's the code:
let messageBody = "Hello World!"
let urlSafeBody = messageBody.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())!
WKExtension.sharedExtension().openSystemURL(NSURL(string: "sms:&body=\(urlSafeBody)")!)