Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Writing local file on iOS device
DRoscoe last edited by DRoscoe
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?
patrikd last edited by patrikd
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
DRoscoe last edited by
Thank you, that worked perfectly!