I am programatically trying to check the size of sqlite database stored, on the iphone after deleting some rows. The records get deleted, but the file size remains the same. Is there any way I can get correct size of file after deleting records from sqlite in ios.
NSString* databasePath = [[NSString alloc]
initWithString: [self.documentsDirectory stringByAppendingPathComponent: self.databaseFilename]];
unsigned long long fileSize = [[[NSFileManager defaultManager]
attributesOfItemAtPath:databasePath error:nil] fileSize];
Aucun commentaire:
Enregistrer un commentaire