浏览代码

Add networking conf

Marino Faggiana 6 年之前
父节点
当前提交
ebb019a0ab
共有 100 个文件被更改,包括 22 次插入5 次删除
  1. 22 5
      iOSClient/Networking/CCNetworking.m
  2. 二进制
      iOSClient/Supporting Files/es-419.lproj/BKPasscodeView.strings
  3. 二进制
      iOSClient/Supporting Files/es-419.lproj/CTAssetsPicker.strings
  4. 二进制
      iOSClient/Supporting Files/es-419.lproj/Error.strings
  5. 二进制
      iOSClient/Supporting Files/es-419.lproj/InfoPlist.strings
  6. 二进制
      iOSClient/Supporting Files/es-419.lproj/Intro.strings
  7. 二进制
      iOSClient/Supporting Files/es-419.lproj/Localizable.strings
  8. 二进制
      iOSClient/Supporting Files/es-419.lproj/SwiftWebVC.strings
  9. 二进制
      iOSClient/Supporting Files/es-CL.lproj/BKPasscodeView.strings
  10. 二进制
      iOSClient/Supporting Files/es-CL.lproj/CTAssetsPicker.strings
  11. 二进制
      iOSClient/Supporting Files/es-CL.lproj/Error.strings
  12. 二进制
      iOSClient/Supporting Files/es-CL.lproj/InfoPlist.strings
  13. 二进制
      iOSClient/Supporting Files/es-CL.lproj/Intro.strings
  14. 二进制
      iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
  15. 二进制
      iOSClient/Supporting Files/es-CL.lproj/SwiftWebVC.strings
  16. 二进制
      iOSClient/Supporting Files/es-CO.lproj/BKPasscodeView.strings
  17. 二进制
      iOSClient/Supporting Files/es-CO.lproj/CTAssetsPicker.strings
  18. 二进制
      iOSClient/Supporting Files/es-CO.lproj/Error.strings
  19. 二进制
      iOSClient/Supporting Files/es-CO.lproj/InfoPlist.strings
  20. 二进制
      iOSClient/Supporting Files/es-CO.lproj/Intro.strings
  21. 二进制
      iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
  22. 二进制
      iOSClient/Supporting Files/es-CO.lproj/SwiftWebVC.strings
  23. 二进制
      iOSClient/Supporting Files/es-CR.lproj/BKPasscodeView.strings
  24. 二进制
      iOSClient/Supporting Files/es-CR.lproj/CTAssetsPicker.strings
  25. 二进制
      iOSClient/Supporting Files/es-CR.lproj/Error.strings
  26. 二进制
      iOSClient/Supporting Files/es-CR.lproj/InfoPlist.strings
  27. 二进制
      iOSClient/Supporting Files/es-CR.lproj/Intro.strings
  28. 二进制
      iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
  29. 二进制
      iOSClient/Supporting Files/es-CR.lproj/SwiftWebVC.strings
  30. 二进制
      iOSClient/Supporting Files/es-DO.lproj/BKPasscodeView.strings
  31. 二进制
      iOSClient/Supporting Files/es-DO.lproj/CTAssetsPicker.strings
  32. 二进制
      iOSClient/Supporting Files/es-DO.lproj/Error.strings
  33. 二进制
      iOSClient/Supporting Files/es-DO.lproj/InfoPlist.strings
  34. 二进制
      iOSClient/Supporting Files/es-DO.lproj/Intro.strings
  35. 二进制
      iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
  36. 二进制
      iOSClient/Supporting Files/es-DO.lproj/SwiftWebVC.strings
  37. 二进制
      iOSClient/Supporting Files/es-EC.lproj/BKPasscodeView.strings
  38. 二进制
      iOSClient/Supporting Files/es-EC.lproj/CTAssetsPicker.strings
  39. 二进制
      iOSClient/Supporting Files/es-EC.lproj/Error.strings
  40. 二进制
      iOSClient/Supporting Files/es-EC.lproj/InfoPlist.strings
  41. 二进制
      iOSClient/Supporting Files/es-EC.lproj/Intro.strings
  42. 二进制
      iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
  43. 二进制
      iOSClient/Supporting Files/es-EC.lproj/SwiftWebVC.strings
  44. 二进制
      iOSClient/Supporting Files/es-GT.lproj/BKPasscodeView.strings
  45. 二进制
      iOSClient/Supporting Files/es-GT.lproj/CTAssetsPicker.strings
  46. 二进制
      iOSClient/Supporting Files/es-GT.lproj/Error.strings
  47. 二进制
      iOSClient/Supporting Files/es-GT.lproj/InfoPlist.strings
  48. 二进制
      iOSClient/Supporting Files/es-GT.lproj/Intro.strings
  49. 二进制
      iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
  50. 二进制
      iOSClient/Supporting Files/es-GT.lproj/SwiftWebVC.strings
  51. 二进制
      iOSClient/Supporting Files/es-HN.lproj/BKPasscodeView.strings
  52. 二进制
      iOSClient/Supporting Files/es-HN.lproj/CTAssetsPicker.strings
  53. 二进制
      iOSClient/Supporting Files/es-HN.lproj/Error.strings
  54. 二进制
      iOSClient/Supporting Files/es-HN.lproj/InfoPlist.strings
  55. 二进制
      iOSClient/Supporting Files/es-HN.lproj/Intro.strings
  56. 二进制
      iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
  57. 二进制
      iOSClient/Supporting Files/es-HN.lproj/SwiftWebVC.strings
  58. 二进制
      iOSClient/Supporting Files/es-MX.lproj/BKPasscodeView.strings
  59. 二进制
      iOSClient/Supporting Files/es-MX.lproj/CTAssetsPicker.strings
  60. 二进制
      iOSClient/Supporting Files/es-MX.lproj/Error.strings
  61. 二进制
      iOSClient/Supporting Files/es-MX.lproj/InfoPlist.strings
  62. 二进制
      iOSClient/Supporting Files/es-MX.lproj/Intro.strings
  63. 二进制
      iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
  64. 二进制
      iOSClient/Supporting Files/es-MX.lproj/SwiftWebVC.strings
  65. 二进制
      iOSClient/Supporting Files/es-NI.lproj/BKPasscodeView.strings
  66. 二进制
      iOSClient/Supporting Files/es-NI.lproj/CTAssetsPicker.strings
  67. 二进制
      iOSClient/Supporting Files/es-NI.lproj/Error.strings
  68. 二进制
      iOSClient/Supporting Files/es-NI.lproj/InfoPlist.strings
  69. 二进制
      iOSClient/Supporting Files/es-NI.lproj/Intro.strings
  70. 二进制
      iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
  71. 二进制
      iOSClient/Supporting Files/es-NI.lproj/SwiftWebVC.strings
  72. 二进制
      iOSClient/Supporting Files/es-PA.lproj/BKPasscodeView.strings
  73. 二进制
      iOSClient/Supporting Files/es-PA.lproj/CTAssetsPicker.strings
  74. 二进制
      iOSClient/Supporting Files/es-PA.lproj/Error.strings
  75. 二进制
      iOSClient/Supporting Files/es-PA.lproj/InfoPlist.strings
  76. 二进制
      iOSClient/Supporting Files/es-PA.lproj/Intro.strings
  77. 二进制
      iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
  78. 二进制
      iOSClient/Supporting Files/es-PA.lproj/SwiftWebVC.strings
  79. 二进制
      iOSClient/Supporting Files/es-PE.lproj/BKPasscodeView.strings
  80. 二进制
      iOSClient/Supporting Files/es-PE.lproj/CTAssetsPicker.strings
  81. 二进制
      iOSClient/Supporting Files/es-PE.lproj/Error.strings
  82. 二进制
      iOSClient/Supporting Files/es-PE.lproj/InfoPlist.strings
  83. 二进制
      iOSClient/Supporting Files/es-PE.lproj/Intro.strings
  84. 二进制
      iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
  85. 二进制
      iOSClient/Supporting Files/es-PE.lproj/SwiftWebVC.strings
  86. 二进制
      iOSClient/Supporting Files/es-PR.lproj/BKPasscodeView.strings
  87. 二进制
      iOSClient/Supporting Files/es-PR.lproj/CTAssetsPicker.strings
  88. 二进制
      iOSClient/Supporting Files/es-PR.lproj/Error.strings
  89. 二进制
      iOSClient/Supporting Files/es-PR.lproj/InfoPlist.strings
  90. 二进制
      iOSClient/Supporting Files/es-PR.lproj/Intro.strings
  91. 二进制
      iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
  92. 二进制
      iOSClient/Supporting Files/es-PR.lproj/SwiftWebVC.strings
  93. 二进制
      iOSClient/Supporting Files/es-PY.lproj/BKPasscodeView.strings
  94. 二进制
      iOSClient/Supporting Files/es-PY.lproj/CTAssetsPicker.strings
  95. 二进制
      iOSClient/Supporting Files/es-PY.lproj/Error.strings
  96. 二进制
      iOSClient/Supporting Files/es-PY.lproj/InfoPlist.strings
  97. 二进制
      iOSClient/Supporting Files/es-PY.lproj/Intro.strings
  98. 二进制
      iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
  99. 二进制
      iOSClient/Supporting Files/es-PY.lproj/SwiftWebVC.strings
  100. 二进制
      iOSClient/Supporting Files/es-SV.lproj/BKPasscodeView.strings

+ 22 - 5
iOSClient/Networking/CCNetworking.m

@@ -219,8 +219,8 @@
     
     if (sharedOCCommunication == nil)
     {
+        // Network
         NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
-        
         configuration.allowsCellularAccess = YES;
         configuration.discretionary = NO;
         configuration.HTTPMaximumConnectionsPerHost = k_maxConcurrentOperation;
@@ -230,18 +230,35 @@
         [networkSessionManager.operationQueue setMaxConcurrentOperationCount: k_maxConcurrentOperation];
         networkSessionManager.responseSerializer = [AFHTTPResponseSerializer serializer];
         
+        // Download
         NSURLSessionConfiguration *configurationDownload = [NSURLSessionConfiguration defaultSessionConfiguration];
-        
         configurationDownload.allowsCellularAccess = YES;
         configurationDownload.discretionary = NO;
         configurationDownload.HTTPMaximumConnectionsPerHost = 1;
         configurationDownload.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
+        configurationDownload.timeoutIntervalForRequest = k_timeout_upload;
         
         OCURLSessionManager *downloadSessionManager = [[OCURLSessionManager alloc] initWithSessionConfiguration:configurationDownload];
         [downloadSessionManager.operationQueue setMaxConcurrentOperationCount:1];
-        downloadSessionManager.responseSerializer = [AFHTTPResponseSerializer serializer];
-       
-        sharedOCCommunication = [[OCCommunication alloc] initWithUploadSessionManager:nil andDownloadSessionManager:downloadSessionManager andNetworkSessionManager:networkSessionManager];
+        [downloadSessionManager setSessionDidReceiveAuthenticationChallengeBlock:^NSURLSessionAuthChallengeDisposition (NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential) {
+            return NSURLSessionAuthChallengePerformDefaultHandling;
+        }];
+        
+        // Upload
+        NSURLSessionConfiguration *configurationUpload = [NSURLSessionConfiguration defaultSessionConfiguration];
+        configurationUpload.allowsCellularAccess = YES;
+        configurationUpload.discretionary = NO;
+        configurationUpload.HTTPMaximumConnectionsPerHost = 1;
+        configurationUpload.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
+        configurationUpload.timeoutIntervalForRequest = k_timeout_upload;
+
+        OCURLSessionManager *uploadSessionManager = [[OCURLSessionManager alloc] initWithSessionConfiguration:configurationUpload];
+        [uploadSessionManager.operationQueue setMaxConcurrentOperationCount:1];
+        [uploadSessionManager setSessionDidReceiveAuthenticationChallengeBlock:^NSURLSessionAuthChallengeDisposition (NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential) {
+            return NSURLSessionAuthChallengePerformDefaultHandling;
+        }];
+        
+        sharedOCCommunication = [[OCCommunication alloc] initWithUploadSessionManager:uploadSessionManager andDownloadSessionManager:downloadSessionManager andNetworkSessionManager:networkSessionManager];
     }
     
     return sharedOCCommunication;

二进制
iOSClient/Supporting Files/es-419.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-419.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-419.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-419.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-419.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-419.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-419.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-CL.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-CO.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-CR.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-DO.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-EC.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-GT.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-HN.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-MX.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-NI.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PA.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PE.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PR.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/BKPasscodeView.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/CTAssetsPicker.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/Error.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/InfoPlist.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/Intro.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/Localizable.strings


二进制
iOSClient/Supporting Files/es-PY.lproj/SwiftWebVC.strings


二进制
iOSClient/Supporting Files/es-SV.lproj/BKPasscodeView.strings


部分文件因为文件数量过多而无法显示