對不起,我的英語。我有一個存儲問題,Apple拒絕了我的應用程序。我在我的應用程序中使用了一個sqlite數據庫,並從數據包中複製它,因爲我需要數據庫中的更新記錄。有很多關於這方面的信息,但它不適合我!IOS存儲問題
我tryed使用NSURLIsExcludedFromBackupKey
使用目錄NSApplicationSupportDirectory
,library/caches
和另一個,但它不工作,我看到我的存儲應用程序與數據庫的大小,如果我不能複製我的分貝我沒有看到我在存儲應用程序,但我需要複印件。
我該怎麼辦?
我用iOs9,Xcode中7:
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
stringByAppendingPathComponent:@"db_words"];
NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath]
stringByAppendingPathComponent:@"db_words"];
NSURL *applicationSupportDirectory = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory
inDomain:NSUserDomainMask
appropriateForURL:nil
create:YES
error:&error];
NSURL *referenceFolder = [applicationSupportDirectory URLByAppendingPathComponent:@"Reference" isDirectory:YES];
success = [[NSFileManager defaultManager] createDirectoryAtPath:[referenceFolder path]
withIntermediateDirectories:YES
attributes:nil
error:&error]
success = [referenceFolder setResourceValue:@YES forKey: NSURLIsExcludedFromBackupKey error: &error];
if(!success){
NSLog(@"KCDM: Error excluding %@ from backup %@", referenceFolder, error);
}
NSString * writableDBPath = [referenceFolder.path stringByAppendingPathComponent:@"db_words"];
success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error];
if (!success)
NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
return writableDBPath;
請用戶的icloud的,這不符合iOS的數據添加蘋果公司拒絕說明, – Idali
2.23詳細信息發佈和下載內容,您的應用程序商店66.91 MB –
,我也看到這67米的存儲空間,但我沒有任何想法爲什麼? –