I created a game that involves the use of a dictionary. It has about 73000 words. However, after the review process the app got rejected. Here is the review comments:
"We found that your app crashed on an iPad running iOS 6.1.3" "The app crashes when tapping the play button." "Your app may encounter this issue if it is using too much memory."
I am stumped. No problem with the app on my iPhone running 6.1.3 or my iPad running 6.1.3. So I am assuming it crashed on an iPad mini. Is there a more efficient way/better place to load a dictionary into memory? This is how I currently do it after the play button is pressed. Thanks in advance!
NSString *filePath = [[NSBundle mainBundle] pathForResource: [NSString stringWithFormat: @"dictionary"] ofType:@"txt"]; //set where to get the dictionary from
NSData* data = [NSData dataWithContentsOfFile:filePath]; //pull the content from the file into memory
NSString* string = [[[NSString alloc] initWithBytes:[data bytes]
length:[data length]
encoding:NSUTF8StringEncoding] autorelease];//convert the bytes from the file into a string
NSString* delimiter = @"\n";//split the string around newline characters to create an array
currentDict = [string componentsSeparatedByString:delimiter];
[currentDict retain];