upload files to Dropbox from iOS app with Swift -


i have completed tutorial(https://blogs.dropbox.com/developers/2014/09/swift-apps-with-dropbox/) , linked ios app dropbox. however, want upload file app dropbox. tutorials out there have code in objective c, including main 1 dropbox (https://www.dropbox.com/developers/core/start/ios). does know how swift?

thanks!

it works.

let textcontent = "hello swift upload"  let textdata:nsdata? = textcontent.datausingencoding(nsutf8stringencoding)  var client:dropboxclient? = dropbox.authorizedclient  if let cli = client {     cli.files.upload(path: "/swift-upload.txt", mode: files.writemode.add, autorename: false, clientmodified: nil, mute: false, body: textdata!) } 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -