내용이 입력된 상태로 Messages 앱 열기

func sendMessage() {
    let text = "안녕하세요.\\n아래 주소로 이동해주세요.\\nhttps://google.com".addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""

    guard let messageURL = URL(string: "sms://?&body=\\(text)") else { return }
    if UIApplication.shared.canOpenURL(messageURL) {
        UIApplication.shared.open(messageURL)
    }
}

참고

https://developer.apple.com/library/archive/qa/qa1944/_index.html#//apple_ref/doc/uid/DTS40017631