title: NSApplicationSupportDirectory invalid CFStringRef
body: <p>I'm trying to store a file in the NSApplicationSupportDirectory, since i have a preloaded folder in my app, which i want to add files to once the app have been initialized. I'm trying to NSLog the content of the file, so i can see if it actually worked. From the debugger, i can see that the content is , which i don't not what means. Anybody?</p>
  
  <pre><code>NSString *document = [NSString stringWithFormat:@"%@ %@ %@ %@ %@", description, focus, level, equipment, waterDepth];
  
  //NSLog(@"%@", document);
  
  //get the documents directory:
  NSArray *paths = NSSearchPathForDirectoriesInDomains
  (NSApplicationSupportDirectory, NSUserDomainMask, YES);
  NSString *supportDirectory = [paths objectAtIndex:0];
  
  //filename
  NSString *filename = [NSString stringWithFormat:@"%@/%@", supportDirectory,[_nameTextField.text stringByAppendingString:@".txt"]];
  NSLog(@"%@", supportDirectory);
  NSLog(@"%@", filename);
  
  [document writeToFile:filename atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil];
  
  NSString *content = [[NSString alloc]initWithContentsOfFile:filename usedEncoding:nil error:nil];
  NSLog(@"%@", content);
  </code></pre>