Hello All,
Currently My application is getting crashed on accessing NSString after bringing application to foreground from background [on 4.0 OS].
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
iDatabasePath = [documentsDirectory stringByAppendingPathComponent:KApp_DB_Name];
iDatabasePath is declared as NSString* and it is globally declared.
When Application is moved to background and brought to foreground when I make a call to
iDatabasePath = [documentsDirectory stringByAppendingPathComponent:KApp_DB_Name];
Application crashes due to EXC_BAD_ACCESS to iDatabasePath and this is happening on 4.0 OS
Please help me on this.
Thanks,
Sagar