Browse Source

版本更新,增加本地版本对比:处理多个版本未更新,中间存在强更版本的问题。

Steven 11 months ago
parent
commit
8c58be256c

+ 1 - 1
KulexiuForStudent/KulexiuForStudent.xcodeproj/xcshareddata/xcschemes/KulexiuForStudent.xcscheme

@@ -51,7 +51,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "TEST"
+      buildConfiguration = "DEV"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"

+ 3 - 1
KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSUpdateAlert.m

@@ -44,7 +44,9 @@
         self.noforceView.hidden = NO;
     }
     self.tipsLabel.text = [NSString stringWithFormat:@"V%@新版本抢先体验",memo];
-    
+    if ([NSString isEmptyString:descMessage]) {
+        descMessage = @"";
+    }
     NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
     [paragraphStyle setLineSpacing:4];//调整行间距
     NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:descMessage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f weight:UIFontWeightMedium],NSForegroundColorAttributeName:HexRGB(0x808080)}];

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -328,6 +328,8 @@
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-admin/appVersionInfo/queryByPlatform"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@"ios-student" forKey:@"platform"];
+    NSString *currentVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
+    [parm setValue:currentVersion forKey:@"localVersion"];
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }