NSString *documentPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *realPath =[documentPath stringByAppendingPathComponent:filename];
用这个方法后file在电脑中的路径为:当前用户/Library/Application Support/iPhone Simulator/版本号(4.1)/Applications/你的app名所在文件夹/Documents
通过这个路径可以找到你项目的所存的数据库,以及各种缓存等文件.
posted on
浙公网安备 33010602011771号