First of all, I\'m really surprised that this is not a duplicate, because there are TONS of stackoverflow questions that solve this in Objective-C, but I have yet to see a g
Simpler solution may be opening html link:
let mPhoneNumber = "1111111111"; let mMessage = "hello%20phone"; if let url = URL(string: "sms://" + mPhoneNumber + "&body="+mMessage) { UIApplication.shared.open(url) }
Make sure you replaced spaces with "%20"