본문 바로가기

Document

Application supports iTunes file sharing .plist에서 아래와 같이 선택하면, iTunes에서 Document 폴더의 내용을 볼 수 있다.(업로드/다운로드도 가능) 만약, iTunes에서 보여주고 싶지 않은 파일이 있다면, .data라는 폴더를 만들어 이 안에 파일을 추가하면 된다. 더보기
Device에서 Sqlite 사용 단순히 Read(select문)을 사용할 경우 main bundle에서 사용해도 되지만, 그외에 write(insert, update, delete문)을 사용할 경우, 권한 문제로 sqlite파일을 Document폴더에 복사 후 사용해야 한다. 아래는 복사 코드. NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *writableDBPath = [docume.. 더보기
iPhone Document 불러오기/저장/삭제 예제 iPhone의 Document에 'Images'라는 폴더를 추가하여, 이미지를 저장/불러오기/삭제하는 예제 아이튠즈에 연결하면 파일을 볼 수 있다. 더보기
Using The Document Directory To Store Files 출처 : http://www.ios-developer.net/iphone-ipad-programmer/development/file-saving-and-loading/using-the-document-directory-to-store-files Does File Exist NSString *path; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); path = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"SomeDirectory"]; path = [path stringByAppendingPathComponent:@"Som.. 더보기