[英]ios app crashes with no log
我有一個我寫的內置和測試的ios應用程序
然后我上傳給其他人測試
在他們的設備上應用程序崩潰
我下載了鏈接到我原來的開發設備,然后在我的設備上應用程序也崩潰了,當我通過xcode運行相同的版本時,崩潰永遠不會發生。
我已經到了代碼中的某個位置,該位置與屏幕上的字段相關聯
我有一個方法
-(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;
}
用戶文件看起來像這樣
@interface User : NSObject
@property (nonatomic,strong)NSString *username;
@property (nonatomic,strong)NSString *password;
@end
@implementation User
//empty file
@end
該應用程序沒有耗盡內存,它似乎在40MB的內存上運行
我的問題是:為什么,當應用程序不通過xcode運行時,用戶無法分配?
嘗試檢查異常之類的
@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);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.