Creating Database in iOS Application
I have developed an application in iOS using qt . Actually it has to create a db sqlitedata.db . But Db is not getting created . I have used "QStandardPaths::standardLocations(QStandardPaths::StandardLocation type)" to get the correct path. The path it gave me (when I used qDebug() ) was:
/var/mobile/Applications/262093E8-F9A7-4624-9559-FB3C6BF393E5/Library/Application Support/sqlitedata.db . But Inside Library folder there is no folder named Application Support and database . Please give me a solution to create a DB and read and update the DB through application .
@Refi What parameter did you pass to QStandardPaths::standardLocations(QStandardPaths::StandardLocation type)?
You should use QStandardPaths::AppDataLocation
For creating and updating a database please take time to read http://doc.qt.io/qt-5/sql-programming.html
Thank you I will try QStandardPaths::AppDataLocation
ios is quirky with that,
make sure the path returned from QStandardPath actually exists. If it doesn't, than create it first.
Thank you . When created folders, it worked !