i am saving a NSMutuablearray to a text file, he has NSNmbers in it .
when i open it (it sent to my emal) i see :
<integer>-13</integer>
<integer>-80</integer>
<integer>-15</integer>
i want ONLY the numbers without this <integer> sign.
there is a way of removing that? or put that numbers not in nsmutuable ?
code :
//add numbers
for(int i=0;i<417;i++)
{
int x= [globals sharedGlobals].bufBuf[i];
NSNumber* myNumber = [NSNumber numberWithInt: x];
[samples addObject:myNumber];
}
//create file
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fullFileName = [NSString stringWithFormat:@"%@/samplesTest.txt", documentsDirectory];
[samples writeToFile:fullFileName atomically:NO];
thanks.
You can prepare a string with your numbers, and save it to the file: