Rejected by Apple, iOS Data Storage Guidelines

I’ve made a simple game that I’ve uploaded to app store a few days ago. Today it got rejected because of “iOS Data Storage Guidelines”. Apple says that my app stores 154.3 MB in the documents folder. But when I look in Settings > iCloud > Storage & Backup > Manage Storage it’s only storing 23 kb. And the only thing I’m storing is a simple sqlite db to keep track of the players highscore. I’ve tested the app on several devices and on all devices I’ve tried the app it says that it’s storing only ~20 kb. So I have no idea what to do to fix this.

The code I’m using to create the database file looks like this,

local dbPath = system.pathForFile("highscore.db3", system.DocumentsDirectory) local db = sqlite3.open(dbPath) local tablesetup = [[CREATE TABLE scores (id INTEGER PRIMARY KEY, score INTEGER, level INTEGER); CREATE TABLE levels (id INTEGER PRIMARY KEY, score INTEGER, level INTEGER); INSERT INTO scores VALUES (NULL, 0, 0); INSERT INTO levels VALUES (NULL, 0, 0);]] db:exec(tablesetup) --Create it now. db:close()

I’m sure that the only file that is stored in the documents folder is the database file by running this code (found in this thread

local lfs = require("lfs") local documentsPath = system.pathForFile("", system.DocumentsDirectory) for file in lfs.dir(documentsPath) do print("File: " .. tostring(file)) end

And the console prints,

File: .    

File: …    

File: highscore.db3   

Anyone have any idea what I can do to fix this?

Just got that rejection for the first time also.

40+ apps on iOS and Apple have never complained until now!

I’ve re-submitted changing system.DocumentsDirectory for system.CachesDirectory. Hopefully that will be acceptable…

Perhaps they found a bug that’s causing the database to grow to enormous size.  Are you downloading anything?  I would write them back asking for information regrading what files and their sizes and that you only expect a small 20K file to be there. 

Rob

Thanks for both of your answers!

I followed Rob’s advice and asked Apple for more information. I didn’t get any reply but instead they approved my app. Very strange. I guess someone at Apple made some kind of mistake.  :slight_smile:

Just got that rejection for the first time also.

40+ apps on iOS and Apple have never complained until now!

I’ve re-submitted changing system.DocumentsDirectory for system.CachesDirectory. Hopefully that will be acceptable…

Perhaps they found a bug that’s causing the database to grow to enormous size.  Are you downloading anything?  I would write them back asking for information regrading what files and their sizes and that you only expect a small 20K file to be there. 

Rob

Thanks for both of your answers!

I followed Rob’s advice and asked Apple for more information. I didn’t get any reply but instead they approved my app. Very strange. I guess someone at Apple made some kind of mistake.  :slight_smile: