Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>-(IBAction)AddToFavourite { NSArray *dirPaths1 = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsDir1 = [dirPaths1 objectAtIndex:0]; NSString *documentPath1 = [docsDir1 stringByAppendingPathComponent:@"MyFovouriteRecordings"]; NSString *soundFilePath1 = [documentPath1 stringByAppendingPathComponent:fileToPlay]; // How to pass here the Current Recording File (recordedTmpFile) to this new document Folder. // First check if the directory existst if([[NSFileManager defaultManager] fileExistsAtPath:documentPath1]==NO) { NSLog(@"Creating content directory: %@",documentPath1); NSError *error=nil; if([[NSFileManager defaultManager] createDirectoryAtPath:documentPath1 withIntermediateDirectories:NO attributes:nil error:&amp;error]==NO) { NSLog(@"There was an error in creating the directory: %@",error); } } //then get the origin file path NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsDir = [dirPaths objectAtIndex:0]; NSString *documentPath = [docsDir stringByAppendingPathComponent:@"MyRecordings"]; NSString *soundFilePath = [documentPath stringByAppendingPathComponent:fileToPlay]; //Then convert paths to URL NSURL* originURL = [NSURL fileURLWithPath:soundFilePath]; NSURL* destinationURL = [NSURL fileURLWithPath:soundFilePath1]; //Then, you have to copy the file [[NSFileManager defaultManager] copyItemAtURL:destinationURL toURL:originURL error:NULL]; } </code></pre> <p>That should do it, tell me if there is any error.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload