因?yàn)樾枨蟾淖兗狗埽孕枰言瓉砭艂€(gè)app改成一個(gè)豹障,其中新的app的Bundle Identifier 需要用其中一個(gè)app的Bundle Identifier巧涧,由于用到新的框架膊存,所以Version 變成了1.0嚼蚀,
問題所在
原來版本的是2.0以上禁灼,以至于更新覆蓋之后,打開就黑屏閃退轿曙,把Version改成和原來一樣弄捕,或者比它大就OK了
解決
由于改動(dòng)比較大,所以建議刪掉數(shù)據(jù)庫和NSUserDefaults的緩存數(shù)據(jù)
// 登錄之前刪除所有的緩存,下面是刪除環(huán)信的聊天記錄
[[EaseMob sharedInstance].chatManager removeAllConversationsWithDeleteMessages:YES append2Chat:YES];
//刪除NSUserDefaults中的所有數(shù)據(jù)
NSString*appDomain = [[NSBundle mainBundle]bundleIdentifier];
[[NSUserDefaults standardUserDefaults]removePersistentDomainForName:appDomain];
//刪除NSUserDefaults中的所有數(shù)據(jù)
NSUserDefaults* defs = [NSUserDefaults standardUserDefaults];
NSDictionary* dict = [defs dictionaryRepresentation];
for(id key in dict) {
[defs removeObjectForKey:key];
}
[defs synchronize];