iOS,沙盒,做数据持久化的时候,有时候需要查看沙盒路径

来源:互联网 发布:php用来做什么的 编辑:程序博客网 时间:2024/06/05 18:45

1.直接上代码

 NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);    NSString *documentDir=[paths objectAtIndex:0];    NSLog(@"我看看路径%@",documentDir);    return [documentDir stringByAppendingPathComponent:@"/patternTest.sqlite"];

2.怎么前往自己的沙盒路径呢



2 0