// 저장될 Document path 가져오기.

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NSString *documentsDirectory = [paths objectAtIndex:0];

// 저장할 파일이름 지정.

documentsDirectory = [documentsDirectory stringByAppendingPathComponent:@"/tmpMovie.m4v"];

    

// byteData를 data에 저장.

NSData *data = [NSData dataWithBytes:byteData_1 length:byteSize];

    

// data 를 파일로 저장.

[data writeToFile:documentsDirectory atomically:YES];

 

+ Recent posts