title: How To write into text File at my application's bundle in xcode
body: <p>beg-counter.txt file is already in my application's bundle....now i wanted to write into it...but i can't....</p>
  
  <p>i can read that file but not able to write into it....</p>
  
  <p>here is my code.......</p>
  
  <p>value of level_beg_cnt is suppose 2.</p>
  
  <p>NSError *error;</p>
  
  <p>NSString *Path = [[NSBundle mainBundle] pathForResource:@"beg_counter" ofType:@"txt"];</p>
  
  <pre><code>    NSLog(@"string to write:%@",level_cnt_beg);
  
  
  
  
      [level_cnt_beg writeToFile:Path atomically:YES
                        encoding:NSUTF8StringEncoding error:&amp;error];
  </code></pre>