1.截圖“Shift+Command+4”(學(xué)會富文本編輯代碼,就不用再截圖了)。
2.判斷推送是否打開
if([[UIDevice currentDevice].systemVersion floatValue]>=8.0f)
{
UIUserNotificationSettings*setting=[[UIApplication sharedApplication] currentUserNotificationSetting];
if(UIUserNotificationTypeNone=setting.types){
openPush=NO;
}else{
openPush = yes;
}
}else{
UIRemoteNotificationType type = [UIApplication sharedApplication] enabledRemoteNotificationTypes];
if(UIRemoteNotificationTypeNone = = type){
openPush = NO;
}else{
openPush = yes
}
}
return openPush;
3.檢測版本以及跳轉(zhuǎn)升級。
靠這個地址你可以拿到你已上架app的信息,包括版本號
http://itunes.apple.com/lookup?id=appid //appid即你應(yīng)用商店里的appid
app在蘋果商店的下載地址藏澳。
if (!releaseArr.count) {
return ;
}
NSDictionary * releaseInfo = releaseArr[0];
trackViewUrl1 = [releaseInfo objectForKey:@"trackViewUrl"];//地址trackViewUrl
獲取當(dāng)前版本號:
NSString *currentVersion = [infoDict objectForKey:@"CFBundleVersion"];
然后版本號比較 判斷是否需要跳轉(zhuǎn) ok。
4.cash文件分析耀找。太懶翔悠,直接引用一個時間較久的博客,但是很詳細(xì)野芒。
http://www.cnblogs.com/ydhliphonedev/archive/2012/12/07/2806866.html