[SOLVED] Writing local file on iOS device
I am trying to write a local file from my iOS app created with Qt 5.4. After initial research it seems I need to write the file to the local Documents folder within my app bundle, but all of my attempts thus far have failed. I dumped the current path from a QDir object. It seems to stop at the app:
What is the best way to do this within Qt framework?
what worked for me :
new QFile(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + "/" + name);
QStandardPaths with QStandardPaths::DocumentsLocation looks like what you want.
Just beware of the automatic backup of the documents, depending on why you will be using it, disabling the backup might be a good idea
Thank you, that worked perfectly!