I have some text the user enters in my Swift 2 app. I need to convert it locally to a .docx file (either by modifying the text of an existing document or creating a new one) and then open up a
I figured this one out for you.
Take this answer user
Casey made, and just change this line:
let fileName = "\(title).txt"
let fileName = "\(title).docx"
and Swift will figure out that you want to export your text as a document, and do it automatically.