Browse Source

1.进度保存中问题

huangxiaodong 11 months ago
parent
commit
830fb2322d

+ 4 - 4
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -4973,7 +4973,7 @@
 				CODE_SIGN_ENTITLEMENTS = "计算器.entitlements";
 				CODE_SIGN_ENTITLEMENTS = "计算器.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(inherited)",
@@ -5056,7 +5056,7 @@
 				CODE_SIGN_ENTITLEMENTS = "计算器.entitlements";
 				CODE_SIGN_ENTITLEMENTS = "计算器.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(inherited)",
@@ -5254,7 +5254,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 7;
+				CURRENT_PROJECT_VERSION = 9;
 				DEVELOPMENT_TEAM = "";
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 				FRAMEWORK_SEARCH_PATHS = (
@@ -5335,7 +5335,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 7;
+				CURRENT_PROJECT_VERSION = 9;
 				DEVELOPMENT_TEAM = "";
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 				FRAMEWORK_SEARCH_PATHS = (

+ 14 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveView.m

@@ -202,7 +202,7 @@
     
     
     for (ShareFileDataModel*dataModel in checkArr){
     for (ShareFileDataModel*dataModel in checkArr){
         NSString *pathStr = dataModel.fileUrl;
         NSString *pathStr = dataModel.fileUrl;
-        [pathArr addObject: pathStr ];
+        [pathArr addObject: pathStr];
     }
     }
     
     
     HLog(@"%@",pathArr);
     HLog(@"%@",pathArr);
@@ -221,11 +221,23 @@
         if(model && model.status == 0){
         if(model && model.status == 0){
             [weakSelf updateDataAfterCheckDownStatus:model];
             [weakSelf updateDataAfterCheckDownStatus:model];
         }
         }
-    } failure:^(NSError * _Nonnull error) {
         
         
+        [weakSelf PollingCheckSaveFileToBoxStateFun];
+        
+    } failure:^(NSError * _Nonnull error) {
+        [weakSelf PollingCheckSaveFileToBoxStateFun];
     }];
     }];
 }
 }
 
 
+#pragma mark 5秒轮询一次查询保存状态
+- (void)PollingCheckSaveFileToBoxStateFun
+{
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [weakSelf checkSaveFileToBoxStateFun];
+    });
+}
+
 #pragma mark 查询保存到盒子的下载状态后更新数据
 #pragma mark 查询保存到盒子的下载状态后更新数据
 - (void)updateDataAfterCheckDownStatus:(downStatusModel*)downStatusMod
 - (void)updateDataAfterCheckDownStatus:(downStatusModel*)downStatusMod
 {
 {

+ 2 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/boxSaveFileManager.m

@@ -179,7 +179,7 @@ static boxSaveFileManager * cur_boxSaveFileShareInstance = nil;
             //HLog(@"%@\n%@",updataModel.url,model.fileUrl);
             //HLog(@"%@\n%@",updataModel.url,model.fileUrl);
             
             
             //去掉空格判断
             //去掉空格判断
-            model.fileUrl = [model.fileUrl stringByReplacingOccurrencesOfString:@" " withString:@""];
+            //model.fileUrl = [model.fileUrl stringByReplacingOccurrencesOfString:@" " withString:@""];
             if ([updataModel.url isEqualToString:model.fileUrl]) {
             if ([updataModel.url isEqualToString:model.fileUrl]) {
                 if (updataModel.curStatus == 0
                 if (updataModel.curStatus == 0
                     || updataModel.curStatus == 3) {
                     || updataModel.curStatus == 3) {
@@ -234,7 +234,7 @@ static boxSaveFileManager * cur_boxSaveFileShareInstance = nil;
         //HLog(@"%@\n%@",updataModel.url,model.fileUrl);
         //HLog(@"%@\n%@",updataModel.url,model.fileUrl);
         
         
         //去掉空格判断
         //去掉空格判断
-        model.fileUrl = [model.fileUrl stringByReplacingOccurrencesOfString:@" " withString:@""];
+        //model.fileUrl = [model.fileUrl stringByReplacingOccurrencesOfString:@" " withString:@""];
         if ([updataModel.fileUrl isEqualToString:model.fileUrl]) {
         if ([updataModel.fileUrl isEqualToString:model.fileUrl]) {
             [self handleDatabaseArrByDelete:model];
             [self handleDatabaseArrByDelete:model];
             
             

+ 1 - 1
创维盒子/双子星云手机/Helpers/iTools.m

@@ -1148,7 +1148,7 @@ static const char encodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopq
     NSError *parseError = nil;
     NSError *parseError = nil;
     NSData *data = [NSJSONSerialization dataWithJSONObject:arr options:NSJSONWritingPrettyPrinted error:nil];
     NSData *data = [NSJSONSerialization dataWithJSONObject:arr options:NSJSONWritingPrettyPrinted error:nil];
     NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
     NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-    jsonStr = [jsonStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+    //jsonStr = [jsonStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
     //jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@" " withString:@""];
     //jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@" " withString:@""];
     //jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\n" withString:@""];
     //jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\n" withString:@""];
     if (parseError) {
     if (parseError) {