Reputation: 13937
I have an ios app that i wrote built and tested
then i uploaded it for other people to test
and on their devices the app crashes
I downloaded the link to my original development device , and on my device the app also crashes however, when i run the same version via xcode, the crash never happens.
I have come down to a location in the code which is associated with getting the fields off the screen
i have a method
-(User *) userDetails
{
User *u = [[User alloc] init]; // <--- this line keeps u nil for some reason
// though other properties are initialized normally
// since u is nil, it returns nil
return u;
}
user file looks like this
@interface User : NSObject
@property (nonatomic,strong)NSString *username;
@property (nonatomic,strong)NSString *password;
@end
@implementation User
//empty file
@end
the app is not running out of memory, it is running on 40MB of ram it seems
my questions is : why, when the app is run not through xcode, user fails to get allocated ?
Upvotes: 0
Views: 147
Reputation: 49710
try to check with exception like
@try
{
// put your code in side try and if there is any issue then NSLOG return exception. so you can get exet issue in log where is prob.
}
@catch(NSException *e)
{
NSLog(@"%@",e);
}
Upvotes: 2