imessage

Sending SMS in iOS with Swift

走远了吗. 提交于 2019-11-26 18:48:59
问题 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 good answer that used Swift. What I'm looking for is a code snippet in Swift that sends an arbitrary string as a the body of a text message to given phone number. Essentially, I'd like something like this from Apple's official documentation, but in Swift instead of Objective-C. I imagine this isn't too difficult, as it can