Commit a374661b authored by zhu's avatar zhu

版本更新

parent 8140cbe6
......@@ -34,7 +34,7 @@
[NSURLProtocol registerClass:[ICRURLProtocol class]];
NSString * path = [NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES) lastObject];
CLog(@"%@",path);
// Required
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_1
......@@ -63,14 +63,11 @@
categories:nil];
}
[APService setupWithOption:launchOptions];
[self setupBMKMapMgr];
_m_appViewControllerMgr = [ICRAppViewControllerManager getAppViewControllerManager];
#pragma 版本更新
[self enterpriseUpdate];
[self.window makeKeyAndVisible];
return YES;
}
#pragma mark enterprise alertView 企业版提示
......@@ -81,9 +78,9 @@
NSString *version = [content valueForKey:@"CFBundleVersion"] ;
self.version=version;
// 获取服务器更新信息
// 获取服务器更新信息
[ self getDataFromServer];
}
//请求服务器更新信息
- (void)getDataFromServer{
......@@ -124,7 +121,7 @@
-(void)comperVersion
{
NSComparisonResult comResult = [self p_compareVersions: self.version betweenVersion2:self.severVersion];
if (comResult == NSOrderedAscending) {
//299企业版的更新 @"有新的版本可供下载"
// NSOrderedAscending self.version<self.severVersion
......@@ -132,8 +129,8 @@
// NSOrderedSame self.version==self.severVersion
if (self.severForceUpdate) {
//强制更新
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: @"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil];
alertV.tag = 1001;
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: @"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil];
alertV.tag = 1001;
[alertV show];
}else
{
......@@ -141,7 +138,7 @@
alertV.tag = 1002;
[alertV show];
}
}else{
[IBTLoadingView showProgressLabel:@"暂无新版本"];
......@@ -154,7 +151,7 @@
- (void) alertView:(UIAlertView *)alertView
clickedButtonAtIndex:(NSInteger)buttonIndex {
if (alertView.tag==1001) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.severUrl]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.severUrl]];
}else if (alertView.tag==1002)
{
if (buttonIndex == 1) {
......@@ -206,7 +203,7 @@ clickedButtonAtIndex:(NSInteger)buttonIndex {
[application cancelAllLocalNotifications];
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
CLog (@"%@", [NSString stringWithFormat:@"Device Token: %@", deviceToken]);
[APService registerDeviceToken:deviceToken];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment