Kaynağa Gözat

修复ERP Mobile 工程的部分警告错误

Ray Zhang 6 yıl önce
ebeveyn
işleme
eeeebb55b3
67 değiştirilmiş dosya ile 608 ekleme ve 500 silme
  1. 19 1
      RedAnt ERP Mobile/common/ActiveViewController.m
  2. 3 3
      RedAnt ERP Mobile/common/AppDelegateBase.m
  3. 7 6
      RedAnt ERP Mobile/common/CartUtils.m
  4. 1 1
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellImg.m
  5. 2 2
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellModel.m
  6. 18 17
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m
  7. 6 6
      RedAnt ERP Mobile/common/Functions/MainViewController.m
  8. 8 6
      RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m
  9. 3 2
      RedAnt ERP Mobile/common/Functions/cart/CartGeneralNotesViewController.m
  10. 37 29
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.m
  11. 2 2
      RedAnt ERP Mobile/common/Functions/cart/ItemNotesViewController.m
  12. 9 9
      RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m
  13. 3 3
      RedAnt ERP Mobile/common/Functions/contact/ContactListViewController.m
  14. 2 2
      RedAnt ERP Mobile/common/Functions/contact/CustomerEditViewController.m
  15. 7 7
      RedAnt ERP Mobile/common/Functions/contact/CustomerInfoViewController.m
  16. 5 5
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m
  17. 2 1
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailTopicCell.m
  18. 11 9
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m
  19. 2 2
      RedAnt ERP Mobile/common/Functions/modelDetail/HomerModelDetailHeaderCell.m
  20. 80 78
      RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m
  21. 9 9
      RedAnt ERP Mobile/common/Functions/offline/OfflineSettingViewController.m
  22. 6 4
      RedAnt ERP Mobile/common/Functions/offline/SelectUploadOrderViewController.m
  23. 2 2
      RedAnt ERP Mobile/common/Functions/offline/SyncControlPanelViewController.m
  24. 27 27
      RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m
  25. 2 2
      RedAnt ERP Mobile/common/Functions/order/OrderDetailModelCell.m
  26. 25 23
      RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m
  27. 16 11
      RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m
  28. 6 4
      RedAnt ERP Mobile/common/Functions/order/RAOrderEditorViewController.m
  29. 26 25
      RedAnt ERP Mobile/common/Functions/order/RAOrderPreviewController.m
  30. 4 3
      RedAnt ERP Mobile/common/Functions/portfolio/PortfolioListViewController.m
  31. 14 13
      RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m
  32. 8 6
      RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.m
  33. 9 9
      RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m
  34. 16 9
      RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m
  35. 3 2
      RedAnt ERP Mobile/common/Functions/sidemenu/CacheViewController.m
  36. 3 3
      RedAnt ERP Mobile/common/Functions/sidemenu/FunctionTestViewController.m
  37. 11 3
      RedAnt ERP Mobile/common/Functions/sidemenu/LoginViewController.m
  38. 8 7
      RedAnt ERP Mobile/common/Functions/sidemenu/UserListViewController.m
  39. 3 2
      RedAnt ERP Mobile/common/Functions/signature/SignatureView.m
  40. 8 5
      RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m
  41. 1 1
      RedAnt ERP Mobile/common/JKLock/JKLockButton.m
  42. 1 1
      RedAnt ERP Mobile/common/JKLock/JKLockController.m
  43. 2 1
      RedAnt ERP Mobile/common/PhotoList/Controller/ContentPreviewController.m
  44. 8 4
      RedAnt ERP Mobile/common/Price Setting/PriceSettingViewController.m
  45. 4 2
      RedAnt ERP Mobile/common/Price Setting/SetCategoryPriceController.m
  46. 3 1
      RedAnt ERP Mobile/common/RAUtils.h
  47. 48 32
      RedAnt ERP Mobile/common/RAUtils.m
  48. 1 1
      RedAnt ERP Mobile/common/TextUtils.m
  49. 45 21
      RedAnt ERP Mobile/common/categoryMenu_RATree/RAViewController.m
  50. 1 1
      RedAnt ERP Mobile/common/customUI/ImageScrollerView.h
  51. 4 4
      RedAnt ERP Mobile/common/customUI/ImageScrollerView.m
  52. 3 3
      RedAnt ERP Mobile/common/customUI/ImageScrollerViewController.m
  53. 1 1
      RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m
  54. 3 3
      RedAnt ERP Mobile/common/data_provider/iSalesDB.m
  55. 6 6
      RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m
  56. 3 3
      RedAnt ERP Mobile/common/photoStack/PhotoStackView.m
  57. 8 1
      RedAnt ERP Mobile/common/zip/ZipArchive.mm
  58. 2 0
      RedAnt ERP Mobile/common/zip/minizip/mztools.c
  59. 2 1
      RedAnt ERP Mobile/common/zip/minizip/unzip.c
  60. 1 1
      RedAnt ERP Mobile/common/zip/minizip/zip.c
  61. 0 16
      RedAnt ERP Mobile/iSales-GATIT.xcodeproj/project.pbxproj
  62. 6 20
      RedAnt ERP Mobile/iSales-UNITED WAVER.xcodeproj/project.pbxproj
  63. 1 1
      common/FileCache.m
  64. 2 2
      common/NetworkUtils.m
  65. 17 11
      common/WK PDF+Web/RAPDFViewController.m
  66. 1 1
      common/WK PDF+Web/WebViewController.m
  67. 1 1
      common/Youtube/RAYTPlayer.m

+ 19 - 1
RedAnt ERP Mobile/common/ActiveViewController.m

@@ -227,9 +227,10 @@
     
     // useless ??? not sure
     
+
+#ifndef RA_NOTIFICATION
     UIApplication * app = [UIApplication sharedApplication];
     AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-#ifndef RA_NOTIFICATION
     if(self==appDelegate.active_controller)
     {
         [self reload_container_getdata:true];
@@ -442,4 +443,21 @@
 }
 
 
+-(void) refresh_ui
+{
+    NSAssert(true, @"subclass %@ refresh_ui does not impl.", [self class_name]);
+}
+-(void) reload_data
+{
+    NSAssert(true, @"subclass %@ reload_data does not impl.", [self class_name]);
+}
+-(void) clear_data
+{
+    NSAssert(true, @"subclass %@ clear_data does not impl.", [self class_name]);
+}
+-(void) refresh_price
+{
+    NSAssert(true, @"subclass %@ refresh_price does not impl.", [self class_name]);
+}
+
 @end

+ 3 - 3
RedAnt ERP Mobile/common/AppDelegateBase.m

@@ -738,7 +738,7 @@ void UncaughtExceptionHandler(NSException *exception) {
                     [RANetwork request_open_order:order_code completionHandler:^(NSMutableDictionary *result) {
                         NSDictionary* order_json = result;
                         
-                        //                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                        //                [waitalert dismissViewControllerAnimated:YES completion:nil];
                         if([[order_json valueForKey:@"result"] intValue]==2)
                         {
                             
@@ -781,7 +781,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 //                    NSDictionary* order_json = [RANetwork open_Order:order_code];
                     
 //                    dispatch_async(dispatch_get_main_queue(), ^{
-//                        //                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                        //                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                        if([[order_json valueForKey:@"result"] intValue]==2)
 //                        {
 //
@@ -1424,7 +1424,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         //
         //
         //            }
-        //            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        //            //  [waitalert dismissViewControllerAnimated:YES completion:nil];
         //        }];
         //
         //

+ 7 - 6
RedAnt ERP Mobile/common/CartUtils.m

@@ -18,11 +18,12 @@
 +(void) neworder:(UIViewController*) vc selectorholder:(id)holder selector:(SEL)addtocart
 {
 
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -59,7 +60,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -389,14 +390,14 @@
             else
             {
 
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Checking Pending Order"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Checking Pending Order"];
 
 
                 [RANetwork request_pendingorder:appDelegate.contact_id completionHandler:^(NSMutableDictionary *result) {
                     NSMutableDictionary* return_json =result;
                     
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     if([[return_json valueForKey:@"result"] intValue]==2)
                     {
@@ -703,7 +704,7 @@
 //
 //                    dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                        [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                        if([[return_json valueForKey:@"result"] intValue]==2)
 //                        {

+ 1 - 1
RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellImg.m

@@ -32,7 +32,7 @@
 }
 - (void)TouchImageViewOnTouche:(TouchImageView *)touchImageView
 {
-    __block int tag = touchImageView.tag;
+    __block int tag =(int) touchImageView.tag;
     UIViewController* vc=[RAUtils getViewController :touchImageView];
     
     if(self.editable==true)

+ 2 - 2
RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellModel.m

@@ -67,11 +67,11 @@
 
 - (IBAction)masterBtnClick:(UIButton *)sender {
     
-    UIViewController* vc=[RAUtils getViewController :sender];
+    
     
 
 #if defined(BUILD_HOMER) || defined(BUILD_GATIT)
-    
+    UIViewController* vc=[RAUtils getViewController :sender];
     MasterModelViewController *masterModelVC = [MasterModelViewController buildMasterModelViewController];
     masterModelVC.content_data = self.master_items;
     UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:masterModelVC];

+ 18 - 17
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -401,7 +401,7 @@
     if(self.url_type==URL_REMOTE)
     {
         
-        UIAlertView * waitalert = [RAUtils waiting_alert:self.loading_msg title:self.loading_title];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title];
         
         [RANetwork request_editor:self.request_url params:self.params completionHandler:^(NSMutableDictionary *result) {
             NSMutableDictionary* editor_json = result;
@@ -409,7 +409,7 @@
             
             
                 
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 
                 if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -449,7 +449,7 @@
 //            DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
 //            dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //                if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1356,7 +1356,7 @@
         
         
         
-        UIAlertView * waitalert = [RAUtils waiting_alert:self.loading_msg title:self.loading_title];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title];
         
         self.params[@"refresh_trigger"]=trigger;
         __weak typeof(self) weakself = self;
@@ -1375,7 +1375,7 @@
             NSMutableDictionary* editor_json = result;
             DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
             
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 
                 if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1419,7 +1419,7 @@
 //            DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
 //
 //            dispatch_async(dispatch_get_main_queue(), ^{
-//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //                if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -2606,7 +2606,7 @@
             [params setValue:val forKey:name];
             
             
-            UIAlertView * waitalert = [RAUtils waiting_alert:self.loading_msg title:self.loading_title];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title];
             __weak typeof(self) weakself = self;
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
@@ -2614,7 +2614,7 @@
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     
                     if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -2726,7 +2726,7 @@
             [params setValue:val forKey:name];
             
             
-            UIAlertView * waitalert = [RAUtils waiting_alert:self.loading_msg title:self.loading_title];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title];
             __weak typeof(self) weakself = self;
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
@@ -2734,7 +2734,7 @@
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     
                     if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -4644,7 +4644,7 @@
     
     DebugLog(@"tableView willSelectRowAtIndexPath");
     
-//    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//
     NSString* control = [item_json valueForKey:@"control"];
     if([control isEqualToString:@"enum"])//||[control isEqualToString:@"ui"])
     {
@@ -4815,6 +4815,7 @@
             if(signimg!=nil)
             {
 #ifdef OFFLINE_MODE
+                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 BOOL offline_mode = [[appDelegate globalParameterForKey:@"offline_mode"] boolValue];
                 if(offline_mode)
                 {
@@ -4885,12 +4886,12 @@
                 if(password!=nil)
                     [params setValue:password forKey:@"password"];
                 
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Upload Signature"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Upload Signature"];
                 
                 [NetworkUtils upload:imageData FileName:@"test.jpg" Params:params ToHost:URL_UPLOAD_IMG Result:^(NSMutableDictionary *json) {
                     
                     dispatch_async(dispatch_get_main_queue(), ^{
-                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                        [waitalert dismissViewControllerAnimated:YES completion:nil];
                         
                         if([[json valueForKey:@"result"] intValue]==2)
                         {
@@ -4941,13 +4942,13 @@
 //
 //
 //                NSProgress *progress = nil;
-//                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Upload Signature"];
+//                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Upload Signature"];
 //                NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
 //
 //                    //        [progress removeObserver:self forKeyPath:@"fractionCompleted"];
 //
 //
-//                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                    if (error) {
 //
@@ -5758,7 +5759,7 @@
     //
     //                dispatch_async(dispatch_get_main_queue(), ^{
     //
-    //                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+    //                    [waitalert dismissViewControllerAnimated:YES completion:nil];
     //
     //
     //                    if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -5877,7 +5878,7 @@
     //
     //                dispatch_async(dispatch_get_main_queue(), ^{
     //
-    //                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+    //                    [waitalert dismissViewControllerAnimated:YES completion:nil];
     //
     //
     //                    if([[editor_json valueForKey:@"result"] intValue]==2)

+ 6 - 6
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -659,12 +659,12 @@
     
     if(appDelegate.bLogin)
     {
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Sign out"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Sign out"];
         
         [RANetwork request_logout:^(NSMutableDictionary *result) {
             NSMutableDictionary* return_json =result;
             
-                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                            [waitalert dismissViewControllerAnimated:YES completion:nil];
                             
                             
                             if([[return_json valueForKey:@"result"] intValue]==2)
@@ -713,7 +713,7 @@
 //            NSDictionary* return_json = [RANetwork logout];
 //            
 //            dispatch_async(dispatch_get_main_queue(), ^{
-//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                
 //                
 //                if([[return_json valueForKey:@"result"] intValue]==2)
@@ -2817,11 +2817,11 @@
 -(void) neworderforCart
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -2865,7 +2865,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //        
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            
 //            
 //            if([[return_json valueForKey:@"result"] intValue]==2)

+ 8 - 6
RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m

@@ -68,7 +68,7 @@
     [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
     CGRect rect=self.view.bounds;
     
-    DebugLog(NSStringFromCGRect(self.focusZone.frame));
+    DebugLog(@"%@",NSStringFromCGRect(self.focusZone.frame));
     //    rect.origin.y=rect.origin.y+40;
     //    rect.size.height = rect.size.height-40;
     
@@ -589,11 +589,13 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+        
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -631,7 +633,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -731,14 +733,14 @@
         [self.targetButton setTitle:@"Target: Model Detail" forState:UIControlStateNormal];
         
         self.target = SCANNER_TARGET_DETAIL;
-        //        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Remove Models From Cart"];
+        //        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Remove Models From Cart"];
         //        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         //
         //            NSDictionary* cart_json = [iSalesNetwork cart_remove:ids];
         //
         //            dispatch_async(dispatch_get_main_queue(), ^{
         //
-        //                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        //                [waitalert dismissViewControllerAnimated:YES completion:nil];
         //
         //                if([[cart_json valueForKey:@"result"] intValue]==2)
         //                {

+ 3 - 2
RedAnt ERP Mobile/common/Functions/cart/CartGeneralNotesViewController.m

@@ -54,7 +54,7 @@
     // [self.tv_notes endEditing:true];
     self.notes = self.tv_notes.text;
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Update General Notes"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Update General Notes"];
     
     NSString* notes=self.tv_notes.text;
     UIApplication * app = [UIApplication sharedApplication];
@@ -71,7 +71,8 @@
         dispatch_async(dispatch_get_main_queue(), ^{
             
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
             if([[cart_json valueForKey:@"result"] intValue]==2)
             {
                 [self dismissViewControllerAnimated:NO

+ 37 - 29
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -128,13 +128,14 @@
         
         
         UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Remove Models From Cart"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Remove Models From Cart"];
             
             [RANetwork request_remove_cart:ids completionHandler:^(NSMutableDictionary *result) {
                 NSMutableDictionary* cart_json =result;
                 
                 
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 if([[cart_json valueForKey:@"result"] intValue]==2)
                 {
@@ -167,7 +168,7 @@
 //
 //                dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                    if([[cart_json valueForKey:@"result"] intValue]==2)
 //                    {
@@ -215,12 +216,12 @@
         
     }];
     UIAlertAction *actionTwo = [UIAlertAction actionWithTitle:@"Move To Wish List" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Move Models To Wish List"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Move Models To Wish List"];
         [RANetwork request_move_cart2wish:ids completionHandler:^(NSMutableDictionary *result) {
             NSDictionary* cart_json =result;
             
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             if([[cart_json valueForKey:@"result"] intValue]==2)
             {
@@ -255,7 +256,7 @@
 //
 //            dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                if([[cart_json valueForKey:@"result"] intValue]==2)
 //                {
@@ -320,13 +321,13 @@
     //
     //
     //    UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Move Models To Wish List"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Move Models To Wish List"];
     
     [RANetwork request_move_cart2wish:ids completionHandler:^(NSMutableDictionary *result) {
         NSDictionary* cart_json = result;
         
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         if([[cart_json valueForKey:@"result"] intValue]==2)
         {
@@ -359,7 +360,7 @@
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
 //
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //            if([[cart_json valueForKey:@"result"] intValue]==2)
 //            {
@@ -421,12 +422,12 @@
     
     
     UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Remove Models From Cart"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Remove Models From Cart"];
         [RANetwork request_remove_cart:ids completionHandler:^(NSMutableDictionary *result) {
             NSMutableDictionary* cart_json =result;
             
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             if([[cart_json valueForKey:@"result"] intValue]==2)
             {
@@ -458,7 +459,7 @@
 //
 //            dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                if([[cart_json valueForKey:@"result"] intValue]==2)
 //                {
@@ -806,7 +807,7 @@
         weakself.mum.hidden = YES;
 //        [self.mum startAnimating];
         DebugLog(@"reloading...");
-        UIAlertView *loadingView = [RAUtils waiting_alert:@"Please Wait" title:@"Loading"];
+        UIAlertController *loadingView = [RAUtils waiting_alert:self title:@"Loading"];
         
         [RANetwork request_cart:weakself.sortIndex completionHandler:^(NSMutableDictionary *result) {
             DebugLog(@"BEGIN LOAD CART");
@@ -814,7 +815,8 @@
             
             //
             //                [self.mum stopAnimating];
-            [loadingView dismissWithClickedButtonIndex:0 animated:YES];
+            [loadingView dismissViewControllerAnimated:YES completion:nil];
+//            [loadingView dismissWithClickedButtonIndex:0 animated:YES];
             
             //            self.content_data = [cart_json mutableCopy];
 #ifdef BACKORDER_PROCESS
@@ -1637,13 +1639,13 @@
     
     UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
            AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Cancel Order"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Cancel Order"];
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
             
             NSDictionary* return_json = [RANetwork cancel_Order:nil order_code:appDelegate.order_code];
             
             dispatch_async(dispatch_get_main_queue(), ^{
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 
                 if([[return_json valueForKey:@"result"] intValue]==2)
@@ -2347,13 +2349,14 @@
         
         {
             
-            UIAlertView *waitting_alert = [RAUtils waiting_alert:@"Sending Email" title:@"Waiting"];
+            UIAlertController *waitting_alert = [RAUtils waiting_alert:self title:@"Sending Email"];
             
             [RANetwork request_notifymodel:productID emailAddr:nil withScreen:ScreenCodeCart completionHandler:^(NSMutableDictionary *result) {
                 NSMutableDictionary *dic = result;
                 
                 
-                [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
+//                [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
+                [waitting_alert dismissViewControllerAnimated:YES completion:nil];
                 
                 int result_code = [[dic valueForKey:@"result"] intValue];
                 
@@ -2671,7 +2674,7 @@
                 }
             }
             
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Update Price"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Update Price"];
             
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
             
@@ -2683,7 +2686,7 @@
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     if([[cart_json valueForKey:@"result"] intValue]==2)
                     {
@@ -2899,14 +2902,14 @@
         NSString* cart_item_id = [item_json valueForKey:@"cart_item_id"];
         
         
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Move To Back Order"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Move To Back Order"];
         
         [RANetwork request_movetobackorder:cart_item_id completionHandler:^(NSMutableDictionary *result) {
            NSMutableDictionary* return_json =result  ;
             
             
                 
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 if([[return_json valueForKey:@"result"] intValue]==2) {
                     
@@ -2926,7 +2929,7 @@
 //
 //            dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                if([[return_json valueForKey:@"result"] intValue]==2) {
 //
@@ -3333,7 +3336,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
                 NSDictionary* newitem = [return_json objectForKey:@"item_0"];
                 NSString* item_id = [newitem valueForKey:@"cart_item_id"];
                 //  bool isnew=false;
-//                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//
                 //                [((MainViewController*)appDelegate.main_vc) reloadWish:true immediately:false];
                 
                 if (self.back_order_flag) {
@@ -3383,7 +3386,11 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
                         
                     }
                 }
+                
+                AppDelegate *appDelegate =nil;
+                appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
 #ifdef OFFLINE_MODE
+                
                 if(appDelegate.offline_mode)
                 {
                     
@@ -3574,13 +3581,13 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
             // 验证是邮件地址,发送邮件
             [weakVC dismissViewControllerAnimated:YES completion:^{
                 
-                UIAlertView *waitting_alert = [RAUtils waiting_alert:@"Sending Email" title:@"Waiting"];
+                UIAlertController *waitting_alert = [RAUtils waiting_alert:self title:@"Sending Email"];
                 
                 [RANetwork request_qouteorder:appDelegate.order_code emailAddr:text completionHandler:^(NSMutableDictionary *result) {
                     DebugLog(@"email cart result: %@",result);
                     
-                    
-                    [waitting_alert dismissWithClickedButtonIndex:0 animated:YES];
+                    [waitting_alert dismissViewControllerAnimated:YES completion:nil];
+//                    [waitting_alert dismissWithClickedButtonIndex:0 animated:YES];
                     
                     if ([[result objectForKey:@"result"] integerValue] != RESULT_TRUE) {
                         
@@ -3703,12 +3710,13 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
             // 验证是邮件地址,发送邮件
             [weakVC dismissViewControllerAnimated:YES completion:^{
                 
-                UIAlertView *waitting_alert = [RAUtils waiting_alert:@"Sending Email" title:@"Waiting"];
+                UIAlertController *waitting_alert = [RAUtils waiting_alert:self title:@"Sending Email"];
                 
                 [RANetwork request_notifymodel:productID emailAddr:text withScreen:ScreenCodeCart completionHandler:^(NSMutableDictionary *result) {
                     
                     
-                    [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
+//                    [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
+                    [waitting_alert dismissViewControllerAnimated:YES completion:nil];
                     
                     int resultStatus = [[result objectForKey:@"result"] intValue];
                     if (resultStatus != RESULT_TRUE && resultStatus != RESULT_NO_EMAIL_ADDRESS) {

+ 2 - 2
RedAnt ERP Mobile/common/Functions/cart/ItemNotesViewController.m

@@ -60,7 +60,7 @@
     
     self.notes = self.tv_notes.text;
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Update Item Notes"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Update Item Notes"];
     
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
@@ -73,7 +73,7 @@
         dispatch_async(dispatch_get_main_queue(), ^{
             
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             if([[cart_json valueForKey:@"result"] intValue]==2)
             {
                 [self dismissViewControllerAnimated:NO

+ 9 - 9
RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m

@@ -549,11 +549,11 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -590,7 +590,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -764,7 +764,7 @@
     
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Cart"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Cart"];
     
     
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -779,7 +779,7 @@
         
         dispatch_async(dispatch_get_main_queue(), ^{
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             self.addCartBtn.enabled = true;
             
             if([[return_json valueForKey:@"result"] intValue]==2)
@@ -904,7 +904,7 @@
     self.addPortfolioBtn.enabled =false;
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Portfolio"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Portfolio"];
     
 
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -918,7 +918,7 @@
         }
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             self.addPortfolioBtn.enabled =true;
             
             if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1007,7 +1007,7 @@
     NSString * ids = [checked componentsJoinedByString:@","];
     self.addWishBtn.enabled =false;
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Wish List"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Wish List"];
     
 
     
@@ -1024,7 +1024,7 @@
         
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             self.addWishBtn.enabled =true;
             
             if([[return_json valueForKey:@"result"] intValue]==2)

+ 3 - 3
RedAnt ERP Mobile/common/Functions/contact/ContactListViewController.m

@@ -578,13 +578,13 @@
     
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Getting Contact information"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Getting Contact information"];
     
     [RANetwork request_contactinfo:contactid completionHandler:^(NSMutableDictionary *result) {
         NSMutableDictionary* editor_json = result;
         
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
             {
@@ -661,7 +661,7 @@
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
 //
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //            if([[editor_json valueForKey:@"result"] intValue]==2)
 //            {

+ 2 - 2
RedAnt ERP Mobile/common/Functions/contact/CustomerEditViewController.m

@@ -258,7 +258,7 @@
     NSMutableDictionary* upparams = [self check_cancommit:true];
     if(self.cancommit==false)
         return;
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving Contact"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Saving Contact"];
     __weak typeof(self) weakself = self;
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
@@ -270,7 +270,7 @@
             editor_json=[RANetwork update_Customer:upparams];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)

+ 7 - 7
RedAnt ERP Mobile/common/Functions/contact/CustomerInfoViewController.m

@@ -159,13 +159,13 @@
         
         
         UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
                 NSDictionary* order_json = [RANetwork release_Order:appDelegate.order_code withScreen:ScreenCodeCustomerInfo];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     if([[order_json valueForKey:@"result"] intValue]==2)
                     {
                         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -386,14 +386,14 @@
 }
 -(void) request_fill
 {
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Loading Contact information"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Loading Contact information"];
     
     
     [RANetwork request_contactinfo:self.contactId completionHandler:^(NSMutableDictionary *result) {
         NSMutableDictionary* editor_json = result;
         
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
             {
@@ -419,7 +419,7 @@
 //        
 //        dispatch_async(dispatch_get_main_queue(), ^{
 //            
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            
 //            if([[editor_json valueForKey:@"result"] intValue]==2)
 //            {
@@ -506,13 +506,13 @@
     
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         NSString* cid=[self getValue:@"customer_cid"];
         NSDictionary* return_json = [RANetwork update_customer_img:cid img_url:url_up];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[return_json valueForKey:@"result"] intValue]==2)

+ 5 - 5
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -100,13 +100,13 @@
 //    
 //    NSString *catelog_name = [NSString stringWithFormat:@"%@ Hang Tag",vc.groupName];
 //    
-//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Processing"];
+//    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Processing"];
 //    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //        
 //        NSDictionary* editor_json = [RANetwork request_hangTag:vc.groupName];
 //        
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            
 //            
 //            if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1360,11 +1360,11 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1425,7 +1425,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)

+ 2 - 1
RedAnt ERP Mobile/common/Functions/modelDetail/DetailTopicCell.m

@@ -71,7 +71,7 @@
 -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
 {
     
-    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    
     NSString* value =[DefaultAppearance get_noneappearance_value:@"CategoryViewController" valuename:@"cell_border_color"];
     
     
@@ -114,6 +114,7 @@
                 NSData*  downloadimg_data = nil;
                 BOOL offline = NO;
 #ifdef OFFLINE_MODE
+                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 offline = appDelegate.offline_mode;
 #endif
                 if (!offline) {

+ 11 - 9
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -633,12 +633,12 @@ dispatch_async(dispatch_get_main_queue(), ^{
     
     NSString *catelog_name = [NSString stringWithFormat:@"%@ Hang Tag",vc.groupName];
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Processing"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Processing"];
     
     [RANetwork request_hangtag:vc.groupName completionHandler:^(NSMutableDictionary *result) {
         NSMutableDictionary* editor_json =result;
         
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -694,7 +694,7 @@ dispatch_async(dispatch_get_main_queue(), ^{
 //        NSDictionary* editor_json = [RANetwork request_hangTag:vc.groupName];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1378,13 +1378,14 @@ dispatch_async(dispatch_get_main_queue(), ^{
             __weak typeof(self) weakself = self;
             cell.notifyMeBlock = ^{
                 
-                UIAlertView *waitting_alert = [RAUtils waiting_alert:@"Sending Email" title:@"Waiting"];
+                UIAlertController *waitting_alert = [RAUtils waiting_alert:self title:@"Sending Email"];
                 
                 [RANetwork request_notifymodel:self.product_id emailAddr:nil withScreen:ScreenCodeModelInfo completionHandler:^(NSMutableDictionary *result) {
                     NSMutableDictionary *dic =result;
                     
                     
-                    [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
+                    [waitting_alert dismissViewControllerAnimated:YES completion:nil];
+//                    [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
                     
                     int result_code = [[dic valueForKey:@"result"] intValue];
                     
@@ -2567,14 +2568,14 @@ dispatch_async(dispatch_get_main_queue(), ^{
     DetailTopicCell * cell=[self.detailTable cellForRowAtIndexPath:indexpath];
 
     [cell begin_refresh];
-//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..."title:@"Refreshing"];
+//    UIAlertController * waitalert = [RAUtils waiting_alert:selftitle:@"Refreshing"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* editor_json = [RANetwork commoneditor_partialrefresh:params url:url];
         
         dispatch_async(dispatch_get_main_queue(), ^{
             [cell end_refresh ];
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
              sender.enabled=true;
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -2672,12 +2673,13 @@ dispatch_async(dispatch_get_main_queue(), ^{
             // 验证是邮件地址,发送邮件
             [weakVC dismissViewControllerAnimated:YES completion:^{
                 
-                UIAlertView *waitting_alert = [RAUtils waiting_alert:@"Sending Email" title:@"Waiting"];
+                UIAlertController *waitting_alert = [RAUtils waiting_alert:self title:@"Sending Email"];
                 [RANetwork request_notifymodel:weakself.product_id emailAddr:text withScreen:ScreenCodeModelInfo completionHandler:^(NSMutableDictionary *result) {
                     DebugLog(@"email cart result: %@",result);
                     
                     
-                    [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
+                    [waitting_alert dismissViewControllerAnimated:YES completion:nil];
+//                    [waitting_alert dismissWithClickedButtonIndex:0 animated:NO];
                     
                     int resultStatus = [[result objectForKey:@"result"] intValue];
                     if (resultStatus != RESULT_TRUE && resultStatus != RESULT_NO_EMAIL_ADDRESS) {

+ 2 - 2
RedAnt ERP Mobile/common/Functions/modelDetail/HomerModelDetailHeaderCell.m

@@ -1025,13 +1025,13 @@ self.informationLabel.frame = CGRectMake(self.informationLabel.frame.origin.x, s
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* return_json = [RANetwork new_Order];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[return_json valueForKey:@"result"] intValue]==2)

+ 80 - 78
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -176,7 +176,8 @@
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     
     sqlite3 *db = [iSalesDB get_db];
-     NSDictionary *resultDic = [iSalesDB jk_query:sql db:db close:NO completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
+//     NSDictionary *resultDic =
+    [iSalesDB jk_query:sql db:db close:NO completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
         
      //   [dic setValue:[NSNumber numberWithInteger:RESULT_TRUE] forKey:@"result"];
         
@@ -557,37 +558,37 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             
             
             
-            int can_show_price = sqlite3_column_int(statement, 0);
-            int can_see_price = sqlite3_column_int(statement, 1);
+//            int can_show_price = sqlite3_column_int(statement, 0);
+//            int can_see_price = sqlite3_column_int(statement, 1);
             
-            char *contact_id = (char*)sqlite3_column_text(statement, 2);
-            if(contact_id==nil)
-                contact_id="";
-            NSString *nscontact_id= [[NSString alloc]initWithUTF8String:contact_id];
+//            char *contact_id = (char*)sqlite3_column_text(statement, 2);
+//            if(contact_id==nil)
+//                contact_id="";
+//            NSString *nscontact_id= [[NSString alloc]initWithUTF8String:contact_id];
             
-            int user_type = sqlite3_column_int(statement, 3);
+//            int user_type = sqlite3_column_int(statement, 3);
             
-            int can_cancel_order = sqlite3_column_int(statement, 4);
-            int can_set_cart_price = sqlite3_column_int(statement, 5);
-            int can_create_portfolio = sqlite3_column_int(statement, 6);
-            int can_delete_order = sqlite3_column_int(statement, 7);
-            int can_submit_order = sqlite3_column_int(statement, 8);
-            int can_set_tearsheet_price = sqlite3_column_int(statement, 9);
-            int can_create_order = sqlite3_column_int(statement, 10);
+//            int can_cancel_order = sqlite3_column_int(statement, 4);
+//            int can_set_cart_price = sqlite3_column_int(statement, 5);
+//            int can_create_portfolio = sqlite3_column_int(statement, 6);
+//            int can_delete_order = sqlite3_column_int(statement, 7);
+//            int can_submit_order = sqlite3_column_int(statement, 8);
+//            int can_set_tearsheet_price = sqlite3_column_int(statement, 9);
+//            int can_create_order = sqlite3_column_int(statement, 10);
             
             
-            char *mode = (char*)sqlite3_column_text(statement, 11);
-            if(mode==nil)
-                mode="";
-            NSString *nsmode= [[NSString alloc]initWithUTF8String:mode];
+//            char *mode = (char*)sqlite3_column_text(statement, 11);
+//            if(mode==nil)
+//                mode="";
+//            NSString *nsmode= [[NSString alloc]initWithUTF8String:mode];
             
             
-            char *username = (char*)sqlite3_column_text(statement, 12);
-            if(username==nil)
-                username="";
-            NSString *nsusername= [[NSString alloc]initWithUTF8String:username];
+//            char *username = (char*)sqlite3_column_text(statement, 12);
+//            if(username==nil)
+//                username="";
+//            NSString *nsusername= [[NSString alloc]initWithUTF8String:username];
             
-            int can_update_contact_info = sqlite3_column_int(statement, 13);
+//            int can_update_contact_info = sqlite3_column_int(statement, 13);
             
             
             char *first_name = (char*)sqlite3_column_text(statement, 14);
@@ -671,7 +672,8 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     NSString* filename =[NSString stringWithFormat:@"%@.png", [[NSUUID UUID] UUIDString]];
     NSString* qrpath=[temp stringByAppendingPathComponent:filename];
     UIImage* qrimg=[ImageUtils generateBarCode:order_code width:480 height:44];//[QRCodeGenerator qrImageForString:order_code imageSize:240];
-    bool bwrite=[UIImagePNGRepresentation(qrimg)writeToFile: qrpath    atomically:YES];
+//    bool bwrite=
+    [UIImagePNGRepresentation(qrimg)writeToFile: qrpath    atomically:YES];
     data[@"img_barcode"]=qrpath;
     data[@"so_id"]=order_code;
     data[@"company"]=COMPANY_FULL_NAME;
@@ -899,7 +901,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 //            NSDate *date1 = [NSDate date];
             
             int count=0;
-            int cart_count=0;
+//            int cart_count=0;
             float credits=0;
             int dbresult=sqlite3_prepare_v2(db, [sql_cart UTF8String], -1, &statement_cart, nil);
             if ( dbresult== SQLITE_OK)
@@ -909,7 +911,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 
                 while (sqlite3_step(statement_cart) == SQLITE_ROW)
                 {
-                    NSDate *row_date = [NSDate date];
+//                    NSDate *row_date = [NSDate date];
                     
                     
                     NSMutableDictionary* itemjson = [[NSMutableDictionary alloc] init];
@@ -1778,7 +1780,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 //            
 //            
 //        }
-//        //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//        //  [waitalert dismissViewControllerAnimated:YES completion:nil];
 //    }];
 //    
 //    
@@ -1988,8 +1990,8 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 +(NSMutableDictionary*) preparecart:(NSString* ) orderCode db:(sqlite3*)db
 {
     NSMutableDictionary* ret = [[NSMutableDictionary alloc] init];
-    UIApplication * app = [UIApplication sharedApplication];
-    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    UIApplication * app = [UIApplication sharedApplication];
+//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
     
     
     
@@ -2298,7 +2300,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 }
 +(bool) check_offlinedata
 {
-    UIApplication * app = [UIApplication sharedApplication];
+//    UIApplication * app = [UIApplication sharedApplication];
     //  AppDelegate *appDelegate = (AppDelegate *)[app delegate];
     sqlite3 *db = [iSalesDB get_db];
     NSString * where=@"1=1";
@@ -2418,7 +2420,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     }
 
     
-    NSString* user = appDelegate.user;
+//    NSString* user = appDelegate.user;
     
     sqlite3 *db = [iSalesDB get_db];
     
@@ -2431,7 +2433,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     sqlite3_stmt * statement;
     
     NSDate *date1 = [NSDate date];
-    NSDate *date2 = nil;
+//    NSDate *date2 = nil;
     
     NSMutableDictionary* ret=[[NSMutableDictionary alloc]init];
     int count=0;
@@ -3241,10 +3243,10 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 load_ability="";
             NSString *nsload_ability = [[NSString alloc]initWithUTF8String:load_ability];
             
-            char *default_category = (char*)sqlite3_column_text(statement, 15);
-            if(default_category==nil)
-                default_category="";
-            NSString *nsdefault_category = [[NSString alloc]initWithUTF8String:default_category];
+//            char *default_category = (char*)sqlite3_column_text(statement, 15);
+//            if(default_category==nil)
+//                default_category="";
+//            NSString *nsdefault_category = [[NSString alloc]initWithUTF8String:default_category];
             
             
             char *fabric_content = (char*)sqlite3_column_text(statement, 16);
@@ -3455,7 +3457,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 }
 
 + (NSDictionary *) search:(NSMutableDictionary *)params limited:(BOOL)limited {
-    NSString* orderCode = [params valueForKey:@"orderCode"];
+//    NSString* orderCode = [params valueForKey:@"orderCode"];
     
     NSString* keyword = [params valueForKey:@"keyword"];
     keyword=keyword.lowercaseString;
@@ -4140,12 +4142,12 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             double iwidth = sqlite3_column_double(statement, 9);
             double iheight = sqlite3_column_double(statement, 10);
             double iweight = sqlite3_column_double(statement, 11);
-            int pcs = sqlite3_column_int(statement,12);
+//            int pcs = sqlite3_column_int(statement,12);
             int mpack = sqlite3_column_int(statement, 13);
             int ipack = sqlite3_column_int(statement, 14);
             double ucbf = sqlite3_column_double(statement, 15);
-            double icbf = sqlite3_column_double(statement, 16);
-            double mcbf = sqlite3_column_double(statement, 17);
+//            double icbf = sqlite3_column_double(statement, 16);
+//            double mcbf = sqlite3_column_double(statement, 17);
             
             if(ipack==0)
             {
@@ -4720,10 +4722,10 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 nsphone= [[NSString alloc]initWithUTF8String:phone];
             
             
-            char *contact_id = (char*)sqlite3_column_text(statement, 9);
-            if(contact_id==nil)
-                contact_id="";
-            NSString *nscontact_id= [[NSString alloc]initWithUTF8String:contact_id];
+//            char *contact_id = (char*)sqlite3_column_text(statement, 9);
+//            if(contact_id==nil)
+//                contact_id="";
+//            NSString *nscontact_id= [[NSString alloc]initWithUTF8String:contact_id];
             
             char *addr_1 = (char*)sqlite3_column_text(statement, 10);
             if(addr_1==nil)
@@ -5521,7 +5523,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 
                 NSString *model_set = [self textAtColumn:0 statement:stmt];
                 NSArray *model_set_components = [model_set componentsSeparatedByString:@" "];
-                cart_count = [[model_set_components lastObject] integerValue];
+                cart_count = [[model_set_components lastObject] intValue];
                 
             }];
         }
@@ -5533,9 +5535,9 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             
             sqlite3_stmt *stmt;
             sqlite3_prepare_v2(db, [sqlQuery UTF8String], -1, &stmt, nil);
-            sqlite3_bind_text(stmt,1,[arr[i] UTF8String],[arr[i] length],NULL);
+            sqlite3_bind_text(stmt,1,[arr[i] UTF8String],(int)[arr[i] length],NULL);
             if (item_count_arr) {
-                sqlite3_bind_int(stmt,2,[item_count_arr[i] integerValue]);
+                sqlite3_bind_int(stmt,2,[item_count_arr[i] intValue]);
             } else {
                 sqlite3_bind_int(stmt,2,cart_count);
             }
@@ -5551,7 +5553,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         } else {
             int qty = 0;
             if (item_count_arr) {
-                qty = [item_count_arr[i] integerValue];
+                qty = [item_count_arr[i] intValue];
             } else {
                 qty = cart_count;
             }
@@ -5724,7 +5726,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         [container setValue:countryDic forKey:key];
     }] mutableCopy];
     
-    [ret setValue:[NSNumber numberWithInt:ret.allKeys.count] forKey:@"count"];
+    [ret setValue:[NSNumber numberWithLong:ret.allKeys.count] forKey:@"count"];
     return ret;
 }
 
@@ -5790,7 +5792,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         [ret setValue:stateDic forKey:key];
     }
     
-    [ret setValue:[NSNumber numberWithInt:ret.allKeys.count] forKey:@"count"];
+    [ret setValue:[NSNumber numberWithLong:ret.allKeys.count] forKey:@"count"];
     
     return ret;
 }
@@ -5825,7 +5827,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         [container setValue:stateDic forKey:key];
     }] mutableCopy];
     [ret removeObjectForKey:@"result"];
-    [ret setValue:[NSNumber numberWithInt:ret.allKeys.count] forKey:@"count"];
+    [ret setValue:[NSNumber numberWithLong:ret.allKeys.count] forKey:@"count"];
     
     return ret;
 }
@@ -5859,7 +5861,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         
     }] mutableCopy];
     
-    [ret setValue:[NSNumber numberWithInt:ret.allKeys.count] forKey:@"count"];
+    [ret setValue:[NSNumber numberWithLong:ret.allKeys.count] forKey:@"count"];
     
     return ret;
 }
@@ -5871,7 +5873,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     
     [iSalesDB jk_query:sql completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
         
-        int _id = sqlite3_column_int(stmt, 0);
+//        int _id = sqlite3_column_int(stmt, 0);
         NSString *name = [self textAtColumn:1 statement:stmt];
         
         NSDictionary *typeDic = @{
@@ -5881,7 +5883,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                                   };
         
         [ret setValue:typeDic forKey:[NSString stringWithFormat:@"val_%ld",*count]];
-        [ret setValue:[NSNumber numberWithInt:++(*count)] forKey:@"count"];
+        [ret setValue:[NSNumber numberWithLong:++(*count)] forKey:@"count"];
         
     } failure:^(NSMutableDictionary *container, NSString *err_msg) {
         
@@ -5937,7 +5939,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         
     }] mutableCopy];
     
-    [ret setValue:[NSNumber numberWithInt:ret.allKeys.count] forKey:@"count"];
+    [ret setValue:[NSNumber numberWithLong:ret.allKeys.count] forKey:@"count"];
     
     return ret;
 }
@@ -8048,7 +8050,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         if (sqlite3_step(statement) == SQLITE_ROW)
         {
             
-            int order_id = sqlite3_column_int(statement, 0);
+//            int order_id = sqlite3_column_int(statement, 0);
             
             NSString *sign_url = [self textAtColumn:51 statement:statement];
 //            ret[@"sign_url"] = sign_url;
@@ -8277,7 +8279,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 } else {
                     card_number = @"";
                 }
-                NSString *card_security_code = [self textAtColumn:44 statement:statement];
+//                NSString *card_security_code = [self textAtColumn:44 statement:statement];
                 NSString *card_expiration_month = [self textAtColumn:45 statement:statement];
                 NSString *card_expiration_year = [self textAtColumn:50 statement:statement];
                 NSString *card_expiration = [NSString stringWithFormat:@"%@/%@",card_expiration_month,card_expiration_year];
@@ -8861,7 +8863,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     if (orderStatus.length > 0) {
         NSArray *order_status_array = [orderStatus componentsSeparatedByString:@","];
         if (order_status_array.count == 1) {
-            int status_value = [[order_status_array firstObject] integerValue];
+            int status_value = [[order_status_array firstObject] intValue];
             if (status_value <= 1 || status_value == 3 || status_value == 15) {
                 
                 if (status_value == 15 || status_value == 3) {
@@ -8883,7 +8885,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 }
                 //                where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %@",condition,status]];
                 
-                int status_value = [status integerValue];
+                int status_value = [status intValue];
                 if (status_value <= 1 || status_value == 3 || status_value == 15) {
                     
                     if (status_value == 15 || status_value == 3) {
@@ -10185,7 +10187,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         
         NSString *poNumber = [self textAtColumn:0 statement:stmt];
         int mustCall = sqlite3_column_int(stmt, 1);
-        NSString *internalNotes = [self textAtColumn:2 statement:stmt];
+//        NSString *internalNotes = [self textAtColumn:2 statement:stmt];
         NSString *generalNotes = [self textAtColumn:3 statement:stmt];
         
         NSDictionary *po_dic = @{
@@ -10210,13 +10212,13 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                                             @"value" : generalNotes
                                             };
         
-        NSDictionary *internal_notes_dic = @{
-                                             @"aname" : @"Internal notes",
-                                             @"control" : @"text_view",
-                                             @"keyboard" : @"text",
-                                             @"name" : @"internal_notes",
-                                             @"value" : internalNotes
-                                             };
+//        NSDictionary *internal_notes_dic = @{
+//                                             @"aname" : @"Internal notes",
+//                                             @"control" : @"text_view",
+//                                             @"keyboard" : @"text",
+//                                             @"name" : @"internal_notes",
+//                                             @"value" : internalNotes
+//                                             };
         
         [dic setValue:po_dic forKey:@"item_0"];
         [dic setValue:must_call_dic forKey:@"item_1"];
@@ -10692,7 +10694,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         [ret setValue:stateDic forKey:key];
     }
     
-    [ret setValue:[NSNumber numberWithInt:ret.allKeys.count] forKey:@"count"];
+    [ret setValue:[NSNumber numberWithLong:ret.allKeys.count] forKey:@"count"];
     
     return ret;
 
@@ -12343,7 +12345,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     NSMutableDictionary *resultDictionary = [NSMutableDictionary dictionary];
     [resultDictionary setObject:@"Regular Mode" forKey:@"mode"];
     
-    NSMutableDictionary * values = params[@"replaceValue"];
+//    NSMutableDictionary * values = params[@"replaceValue"];
     NSNumber *tear_sheet_id = [params objectForKey:@"tearsheetsId"]; // _id
     
     NSString *tear_name = [self valueInParams:params key:@"pdfName"];
@@ -12406,7 +12408,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         [product_ids_string appendFormat:@"%@,",product_id_string];
         
         // Regular Price
-        int regular_price = [[params objectForKey:@"regular_price"] integerValue];
+        int regular_price = [[params objectForKey:@"regular_price"] intValue];
         NSString *regular_price_str = [self get_portfolio_price:appDelegate.contact_id item_id:item_id price:regular_price db:db];
         
         // QTY
@@ -12526,7 +12528,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     NSString *save_pdf_sql = [NSString stringWithFormat:@"insert into offline_pdf (pdf_path,create_user,tear_note,tear_name,model_info,configureParams,is_local,off_params) values ('%@','%@','%@','%@','%@','%@',1,'%@');",pdf_path,create_user,tear_note,tear_name,model_info,configureParams,off_params];
     
     if (tear_sheet_id) {
-        int _id = [tear_sheet_id integerValue];
+        int _id = [tear_sheet_id intValue];
         save_pdf_sql = [NSString stringWithFormat:@"update offline_pdf set pdf_path = '%@' where _id = %d;",pdf_path,_id];
     }
     
@@ -12555,8 +12557,8 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 
 + (NSData *)offline_pdfList:(NSMutableDictionary *)params {
     
-    int offset = [[params valueForKey:@"offset"] integerValue];
-    int limit = [[params valueForKey:@"limit"] integerValue];
+    int offset = [[params valueForKey:@"offset"] intValue];
+    int limit = [[params valueForKey:@"limit"] intValue];
     NSString *keyword = [params valueForKey:@"keyWord"];
     
     NSString *where = @"where is_delete is null or is_delete = 0";
@@ -12884,7 +12886,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     NSInteger tearsheetsId = [[params objectForKey:@"tearsheetsId"] integerValue];
     NSString *user = [params objectForKey:@"user"];
     
-    NSString *create_user = [iSalesDB jk_queryText:[NSString stringWithFormat:@"select create_user from offline_pdf where _id = %d;",tearsheetsId]]; // tearsheets_id ---> _id
+    NSString *create_user = [iSalesDB jk_queryText:[NSString stringWithFormat:@"select create_user from offline_pdf where _id = %ld;",(long)tearsheetsId]]; // tearsheets_id ---> _id
     if (![create_user isEqualToString:user]) {
         [dic setObject:[NSNumber numberWithInt:RESULT_FALSE] forKey:@"result"];
         [dic setObject:@"Regular Mode" forKey:@"mode"];
@@ -12892,7 +12894,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         return [RAConvertor dict2data:dic];
     }
     
-    NSString *is_local_sql = [NSString stringWithFormat:@"select is_local,pdf_path from offline_pdf where _id = %d and create_user = '%@';",tearsheetsId,[self translateSingleQuote:user]];
+    NSString *is_local_sql = [NSString stringWithFormat:@"select is_local,pdf_path from offline_pdf where _id = %ld and create_user = '%@';",(long)tearsheetsId,[self translateSingleQuote:user]];
     
     __block int is_local = 0;
     __block NSString *path = @"";
@@ -12902,10 +12904,10 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         path = [self textAtColumn:1 statement:stmt];
     }];
     
-    NSString *sql = [NSString stringWithFormat:@"update offline_pdf set is_delete = 1 where _id = %d and create_user = '%@';",tearsheetsId,[self translateSingleQuote:user]];
+    NSString *sql = [NSString stringWithFormat:@"update offline_pdf set is_delete = 1 where _id = %ld and create_user = '%@';",(long)tearsheetsId,[self translateSingleQuote:user]];
     
     if (is_local == 1) {
-        sql = [NSString stringWithFormat:@"delete from offline_pdf where _id = %d and create_user = '%@';",tearsheetsId,[self translateSingleQuote:user]];
+        sql = [NSString stringWithFormat:@"delete from offline_pdf where _id = %ld and create_user = '%@';",(long)tearsheetsId,[self translateSingleQuote:user]];
         
         // 删除文件
         [self offline_removePDFWithName:path];

+ 9 - 9
RedAnt ERP Mobile/common/Functions/offline/OfflineSettingViewController.m

@@ -77,14 +77,14 @@
 //        
 //        
 //        UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-//            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Remove Models From Cart"];
+//            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Remove Models From Cart"];
 //            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //                
 //                NSDictionary* cart_json = [iSalesNetwork cart_remove:ids];
 //                
 //                dispatch_async(dispatch_get_main_queue(), ^{
 //                    
-//                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                    
 //                    if([[cart_json valueForKey:@"result"] intValue]==2)
 //                    {
@@ -439,12 +439,12 @@
         
         if(appDelegate.bLogin)
         {
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Sign out"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Sign out"];
             
             [RANetwork request_logout:^(NSMutableDictionary *result) {
                 NSMutableDictionary* return_json=result ;
                 
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 
                 if([[return_json valueForKey:@"result"] intValue]==2)
@@ -501,7 +501,7 @@
 //                NSDictionary* return_json = [RANetwork logout];
 //
 //                dispatch_async(dispatch_get_main_queue(), ^{
-//                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //                    if([[return_json valueForKey:@"result"] intValue]==2)
@@ -591,11 +591,11 @@
             // have offline data
             if(appDelegate.bLogin)
             {
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Sign out"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Sign out"];
                 [RANetwork request_logout:^(NSMutableDictionary *result) {
                     NSMutableDictionary* return_json = result;
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     
                     if([[return_json valueForKey:@"result"] intValue]==2)
@@ -647,7 +647,7 @@
 //                    NSDictionary* return_json = [RANetwork logout];
 //
 //                    dispatch_async(dispatch_get_main_queue(), ^{
-//                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                        [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //                        if([[return_json valueForKey:@"result"] intValue]==2)
@@ -743,7 +743,7 @@
         //
         //
         //            UIAlertAction *actionTwo = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
-        //                //   UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Checking offline data"];
+        //                //   UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Checking offline data"];
         //                //init offline mode
         //                //                dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         //                //

+ 6 - 4
RedAnt ERP Mobile/common/Functions/offline/SelectUploadOrderViewController.m

@@ -163,12 +163,13 @@
                 
                 [alertVC dismissViewControllerAnimated:YES completion:nil];
                 // 关闭订单
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
                 NSDictionary* order_json = [RANetwork release_Order:order_code withScreen:ScreenCodeOfflineSetting];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     if([[order_json valueForKey:@"result"] intValue]==2)
                     {
                         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -203,12 +204,13 @@
         [params setObject:checked_id forKey:@"targetOrderId"];
         [params setObject:[Singleton sharedInstance].customerInfo forKey:@"customerInfo"];
         
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Merge Order"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Merge Order"];
         
         
         [RANetwork request_mergeorder:params completionHandler:^(NSMutableDictionary *result) {
              NSDictionary *ret = result;
-            [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+//            [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
                    
                    [self.navigationController dismissViewControllerAnimated:YES completion:^{
                        

+ 2 - 2
RedAnt ERP Mobile/common/Functions/offline/SyncControlPanelViewController.m

@@ -78,7 +78,7 @@
     
     // Get the string representation of CFUUID object.
     
-    NSString* filename =[[NSUUID UUID] UUIDString];
+//    NSString* filename =[[NSUUID UUID] UUIDString];
     //  NSString *filePath = [path stringByAppendingPathComponent:filename];
     
     
@@ -119,7 +119,7 @@
     
     
     
-    NSData *data = [appDelegate.downloadlog dataUsingEncoding:NSUTF8StringEncoding];//[NSData dataWithContentsOfFile:filePath];
+//    NSData *data = [appDelegate.downloadlog dataUsingEncoding:NSUTF8StringEncoding];//[NSData dataWithContentsOfFile:filePath];
     
     //    if(self.attachment_name.length>0)
     //        filename = self.attachment_name;

+ 27 - 27
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m

@@ -626,7 +626,7 @@
 //            //            //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //            //            //[self.editorTable reloadData ];
 //            //            [self.editorTable reloadData];
-//            //            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            //            //  [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            //            return;
 //            //        }
 //            
@@ -659,14 +659,14 @@
 //                                                {
 //                                                    
 //                                                    if(/*!self.have_tail*/ true)
-//                                                    {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                                                    {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                                                        [upparams setValue:@"false" forKey:@"isHold"];
 //                                                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //                                                            
 //                                                            NSDictionary* editor_json = [iSalesNetwork saveandcommit_Order:upparams];
 //                                                            
 //                                                            dispatch_async(dispatch_get_main_queue(), ^{
-//                                                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                                                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                                                
 //                                                                
 //                                                                if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -779,7 +779,7 @@
 //                                                    //            [upparams setValue:@"true" forKey:@"isHold"];
 //                                                    //            else
 //                                                    //                [upparams setValue:@"false" forKey:@"isHold"];
-//                                                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                                                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                                                    
 //                                                    [upparams setValue:@"true" forKey:@"isHold"];
 //                                                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -788,7 +788,7 @@
 //                                                        
 //                                                        dispatch_async(dispatch_get_main_queue(), ^{
 //                                                            
-//                                                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                                            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                                            
 //                                                            if([[editor_json valueForKey:@"result"] intValue]==2)
 //                                                            {
@@ -879,14 +879,14 @@
 //                    {
 //                        
 //                        if(/*!self.have_tail*/ true)
-//                        {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                        {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                            [upparams setValue:@"false" forKey:@"isHold"];
 //                            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //                                
 //                                NSDictionary* editor_json = [iSalesNetwork saveandcommit_Order:upparams];
 //                                
 //                                dispatch_async(dispatch_get_main_queue(), ^{
-//                                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                    
 //                                    
 //                                    if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1013,7 +1013,7 @@
 //                        //            [upparams setValue:@"true" forKey:@"isHold"];
 //                        //            else
 //                        //                [upparams setValue:@"false" forKey:@"isHold"];
-//                        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                        
 //                        [upparams setValue:@"true" forKey:@"isHold"];
 //                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -1022,7 +1022,7 @@
 //                            
 //                            dispatch_async(dispatch_get_main_queue(), ^{
 //                                
-//                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                
 //                                if([[editor_json valueForKey:@"result"] intValue]==2)
 //                                {
@@ -1189,14 +1189,14 @@
 //                                                {
 //
 //                                                    if(/*!self.have_tail*/ true)
-//                                                    {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                                                    {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                                                        [upparams setValue:@"false" forKey:@"isHold"];
 //                                                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //
 //                                                            NSDictionary* editor_json = [RANetwork saveandcommit_Order:upparams];
 //
 //                                                            dispatch_async(dispatch_get_main_queue(), ^{
-//                                                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                                                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //                                                                if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1311,7 +1311,7 @@
 //                                                    //            [upparams setValue:@"true" forKey:@"isHold"];
 //                                                    //            else
 //                                                    //                [upparams setValue:@"false" forKey:@"isHold"];
-//                                                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                                                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //
 //                                                    [upparams setValue:@"true" forKey:@"isHold"];
 //                                                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -1320,7 +1320,7 @@
 //
 //                                                        dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                                                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                                            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                                                            if([[editor_json valueForKey:@"result"] intValue]==2)
 //                                                            {
@@ -1413,14 +1413,14 @@
 //                    {
 //
 //                        if(/*!self.have_tail*/ true)
-//                        {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                        {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                            [upparams setValue:@"false" forKey:@"isHold"];
 //                            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //
 //                                NSDictionary* editor_json = [RANetwork saveandcommit_Order:upparams];
 //
 //                                dispatch_async(dispatch_get_main_queue(), ^{
-//                                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //                                    if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1556,7 +1556,7 @@
 //                        //            [upparams setValue:@"true" forKey:@"isHold"];
 //                        //            else
 //                        //                [upparams setValue:@"false" forKey:@"isHold"];
-//                        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //
 //                        [upparams setValue:@"true" forKey:@"isHold"];
 //                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -1565,7 +1565,7 @@
 //
 //                            dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                                if([[editor_json valueForKey:@"result"] intValue]==2)
 //                                {
@@ -1753,13 +1753,13 @@
         upparams[@"shipping"] = nil;
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Saving Order"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* editor_json = [RANetwork save_Order:upparams];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -2007,13 +2007,13 @@
             
             
             AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
                 NSDictionary* order_json = [RANetwork release_Order:appDelegate.order_code withScreen:nil];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     if([[order_json valueForKey:@"result"] intValue]==2)
                     {
                         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -2068,7 +2068,7 @@
 //
 //-(void) downloadpdf:(NSString* )url
 //{
-//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Printing..."];
+//    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Printing..."];
 //    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //        
 //        
@@ -2095,7 +2095,7 @@
 //        
 //        
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            //  self.navigationItem.title = self.save_name;
 //            //   UIRefreshControl *reF = (UIRefreshControl *)[self.view viewWithTag:200];
 //            //  self.content=nil;
@@ -2933,7 +2933,7 @@
 - (void)customer_commit_order:(NSMutableDictionary *)upparams {
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     
     [upparams setValue:@"true" forKey:@"isHold"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -2942,7 +2942,7 @@
         
         dispatch_async(dispatch_get_main_queue(), ^{
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
             {
@@ -2993,14 +2993,14 @@
 
 - (void)empolyee_commit_order:(NSMutableDictionary *)upparams {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     [upparams setValue:@"false" forKey:@"isHold"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* editor_json = [RANetwork saveandcommit_Order:upparams];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)

+ 2 - 2
RedAnt ERP Mobile/common/Functions/order/OrderDetailModelCell.m

@@ -60,11 +60,11 @@
 
 - (IBAction)masterBtnClick:(UIButton *)sender {
     
-    UIViewController* vc=[RAUtils getViewController :sender];
+    
     
    
 #if defined(BUILD_HOMER) || defined(BUILD_GATIT)
-    
+    UIViewController* vc=[RAUtils getViewController :sender];
     MasterModelViewController *masterModelVC = [MasterModelViewController buildMasterModelViewController];
     masterModelVC.content_data = self.master_items;
     UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:masterModelVC];

+ 25 - 23
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -290,13 +290,13 @@
     
     
     UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
             
             NSDictionary* order_json = [RANetwork release_Order:self.order_code withScreen:ScreenCodeOrderInfo];
             
             dispatch_async(dispatch_get_main_queue(), ^{
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 if([[order_json valueForKey:@"result"] intValue]==2)
                 {
                     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -346,7 +346,7 @@
     
 }
 - (void)onDownloadOrderClick:(id)sender {
-//    __weak typeof(self) weakself = self;
+//
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     
     RAPDFViewController *ViewController = [[UIStoryboard storyboardWithName:@"wkweb" bundle:nil] instantiateViewControllerWithIdentifier:@"RAPDFViewController"];
@@ -434,6 +434,7 @@
 #ifdef OFFLINE_MODE
         if(appDelegate.offline_mode)
         {
+            __weak typeof(self) weakself = self;
             NSMutableDictionary* params = [@{
                                             @"thumb" : @"1",
                                             @"order_code" : self.order_code != nil ? self.order_code : @"",
@@ -477,6 +478,7 @@
 #ifdef OFFLINE_MODE
         if(appDelegate.offline_mode)
         {
+            __weak typeof(self) weakself = self;
             NSMutableDictionary* params = [@{
                                              @"thumb" : @"0",
                                              @"order_code" : self.order_code != nil ? self.order_code : @"",
@@ -562,7 +564,7 @@
         
         UIAlertAction *yesAction = [UIAlertAction actionWithTitle:@"yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
             
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
             
             dispatch_async(dispatch_get_global_queue(0, 0), ^{
                 
@@ -570,7 +572,7 @@
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     if([[order_json valueForKey:@"result"] intValue]==2)
                     {
                         [appDelegate closeOrder];
@@ -655,13 +657,13 @@
             NSString* img_url_up = json[@"img_url"];
             
             {
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Signature"];
                 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                     
                     NSDictionary* order_json = [RANetwork sign_Order:self.order_code path:img_url_up];
                     
                     dispatch_async(dispatch_get_main_queue(), ^{
-                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                        [waitalert dismissViewControllerAnimated:YES completion:nil];
                         if([[order_json valueForKey:@"result"] intValue]==2)
                         {
                             //                                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -747,7 +749,7 @@
         if(appDelegate.password!=nil)
             [params setValue:appDelegate.password forKey:@"password"];
         
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Signature"];
         
         __weak typeof(self) weakSelf = self;
         [NetworkUtils upload:imageData FileName:@"test.jpg" Params:params ToHost:URL_UPLOAD_IMG Result:^(NSMutableDictionary *json) {
@@ -757,13 +759,13 @@
                 NSString* img_url_down = json[@"img_url_aname"];
                 NSString* img_url_up = json[@"img_url"];
                 {
-//                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
+//                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Signature"];
                     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                         
                         NSDictionary* order_json = [RANetwork sign_Order:weakSelf.order_code path:img_url_up];
                         
                         dispatch_async(dispatch_get_main_queue(), ^{
-                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                            [waitalert dismissViewControllerAnimated:YES completion:nil];
                             if([[order_json valueForKey:@"result"] intValue]==2)
                             {
                                 
@@ -822,7 +824,7 @@
             {
                 dispatch_async(dispatch_get_main_queue(), ^{
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     NSString *msg = [json valueForKey:@"err_msg"];
                     if (msg.length == 0) {
                         msg = [json objectForKey:@"msg"];
@@ -898,13 +900,13 @@
 //                NSString* img_url_up = json[@"img_url"];
 //
 //                {
-//                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
+//                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Signature"];
 //                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //
 //                        NSDictionary* order_json = [iSalesNetwork sign_Order:self.order_code path:img_url_up];
 //
 //                        dispatch_async(dispatch_get_main_queue(), ^{
-//                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                            if([[order_json valueForKey:@"result"] intValue]==2)
 //                            {
 //                                //                                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -997,7 +999,7 @@
 //
 //
 //        }
-//        //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//        //  [waitalert dismissViewControllerAnimated:YES completion:nil];
 //    }];
 //
 //    [uploadTask resume];
@@ -1059,11 +1061,11 @@
 
 - (void)opentOrder:(void(^)(void))completionBlk {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Open Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Open Order"];
     [RANetwork request_open_order:self.order_code completionHandler:^(NSMutableDictionary *result) {
         NSDictionary* order_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         if([[order_json valueForKey:@"result"] intValue]==2)
         {
             AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -1107,7 +1109,7 @@
 //        NSDictionary* order_json = [RANetwork open_Order:self.order_code];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            if([[order_json valueForKey:@"result"] intValue]==2)
 //            {
 //                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -1196,7 +1198,7 @@
 }
 -(void) loaddata
 {
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Loading"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Loading"];
     
     
     
@@ -1237,7 +1239,7 @@
             NSDictionary* order_json = result;
             
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             [self.mum stopAnimating];
             if([[order_json valueForKey:@"result"] intValue]==2)
             {
@@ -1381,7 +1383,7 @@
 //
 //            dispatch_async(dispatch_get_main_queue(), ^{
 //
-//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                [self.mum stopAnimating];
 //                if([[order_json valueForKey:@"result"] intValue]==2)
 //                {
@@ -3723,10 +3725,10 @@
 
 - (void)copyOrder {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Copy Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Copy Order"];
     [RANetwork request_copy_order:self.order_code completionHandler:^(NSMutableDictionary *result) {
         NSDictionary* order_json = result;
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         if([[order_json valueForKey:@"result"] intValue]==2)
         {
             //     NSString* orderCode = [order_json valueForKey:@"orderCode"];
@@ -3770,7 +3772,7 @@
 //        NSDictionary* order_json = [RANetwork copy_Order:self.order_code];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            if([[order_json valueForKey:@"result"] intValue]==2)
 //            {
 //                //     NSString* orderCode = [order_json valueForKey:@"orderCode"];

+ 16 - 11
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -736,11 +736,12 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json =result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -801,7 +802,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1412,13 +1413,14 @@
             
             UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
                 
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Delete Order"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Delete Order"];
                 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                     
                     NSDictionary* return_json = [RANetwork delete_Order:orderid];
                     
                     dispatch_async(dispatch_get_main_queue(), ^{
-                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                        [waitalert dismissViewControllerAnimated:YES completion:nil];
+                        [waitalert dismissViewControllerAnimated:YES completion:nil];
                         
                         
                         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1491,13 +1493,15 @@
             
             UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
                 
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Cancel Order"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Cancel Order"];
                 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                     
                     NSDictionary* return_json = [RANetwork cancel_Order:orderid order_code:nil];
                     
                     dispatch_async(dispatch_get_main_queue(), ^{
-                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                        [waitalert dismissViewControllerAnimated:YES completion:nil];
+                        [waitalert dismissViewControllerAnimated:YES completion:nil];
+                        
                         
                         
                         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1623,12 +1627,12 @@
 //                        
 //                        [alertVC dismissViewControllerAnimated:YES completion:nil];
 //                        // 关闭订单
-//                        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+//                        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
 //                        NSDictionary* order_json = [iSalesNetwork release_Order:orderCode];
 //                        
 //                        dispatch_async(dispatch_get_main_queue(), ^{
 //                            
-//                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                            if([[order_json valueForKey:@"result"] intValue]==2)
 //                            {
 //                                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -1728,13 +1732,14 @@
             
             UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
                 
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Cancel Order"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Cancel Order"];
                 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                     
                     NSDictionary* return_json = [RANetwork cancel_Order:orderid order_code:nil];
                     
                     dispatch_async(dispatch_get_main_queue(), ^{
-                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                        [waitalert dismissViewControllerAnimated:YES completion:nil];
+                        [waitalert dismissViewControllerAnimated:YES completion:nil];
                         
                         
                         if([[return_json valueForKey:@"result"] intValue]==2)

+ 6 - 4
RedAnt ERP Mobile/common/Functions/order/RAOrderEditorViewController.m

@@ -206,13 +206,15 @@ static const int totalPage = 3;
             // close order;
             
             AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
                 NSDictionary* order_json = [RANetwork release_Order:appDelegate.order_code withScreen:nil];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
+                    
                     if([[order_json valueForKey:@"result"] intValue]==2)
                     {
                         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -862,13 +864,13 @@ static const int totalPage = 3;
 //        upparams[@"shipping"] = nil;
 //
 //
-//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving Order"];
+//    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Saving Order"];
 //    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //
 //        NSDictionary* editor_json = [RANetwork save_Order:upparams];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[editor_json valueForKey:@"result"] intValue]==2)

+ 26 - 25
RedAnt ERP Mobile/common/Functions/order/RAOrderPreviewController.m

@@ -637,7 +637,7 @@
     //            //            //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
     //            //            //[self.editorTable reloadData ];
     //            //            [self.editorTable reloadData];
-    //            //            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+    //            //            //  [waitalert dismissViewControllerAnimated:YES completion:nil];
     //            //            return;
     //            //        }
     //
@@ -670,14 +670,14 @@
     //                                                {
     //
     //                                                    if(/*!self.have_tail*/ true)
-    //                                                    {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+    //                                                    {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     //                                                        [upparams setValue:@"false" forKey:@"isHold"];
     //                                                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
     //
     //                                                            NSDictionary* editor_json = [iSalesNetwork saveandcommit_Order:upparams];
     //
     //                                                            dispatch_async(dispatch_get_main_queue(), ^{
-    //                                                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+    //                                                                [waitalert dismissViewControllerAnimated:YES completion:nil];
     //
     //
     //                                                                if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -790,7 +790,7 @@
     //                                                    //            [upparams setValue:@"true" forKey:@"isHold"];
     //                                                    //            else
     //                                                    //                [upparams setValue:@"false" forKey:@"isHold"];
-    //                                                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+    //                                                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     //
     //                                                    [upparams setValue:@"true" forKey:@"isHold"];
     //                                                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -799,7 +799,7 @@
     //
     //                                                        dispatch_async(dispatch_get_main_queue(), ^{
     //
-    //                                                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+    //                                                            [waitalert dismissViewControllerAnimated:YES completion:nil];
     //
     //                                                            if([[editor_json valueForKey:@"result"] intValue]==2)
     //                                                            {
@@ -890,14 +890,14 @@
     //                    {
     //
     //                        if(/*!self.have_tail*/ true)
-    //                        {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+    //                        {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     //                            [upparams setValue:@"false" forKey:@"isHold"];
     //                            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
     //
     //                                NSDictionary* editor_json = [iSalesNetwork saveandcommit_Order:upparams];
     //
     //                                dispatch_async(dispatch_get_main_queue(), ^{
-    //                                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+    //                                    [waitalert dismissViewControllerAnimated:YES completion:nil];
     //
     //
     //                                    if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1024,7 +1024,7 @@
     //                        //            [upparams setValue:@"true" forKey:@"isHold"];
     //                        //            else
     //                        //                [upparams setValue:@"false" forKey:@"isHold"];
-    //                        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+    //                        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     //
     //                        [upparams setValue:@"true" forKey:@"isHold"];
     //                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -1033,7 +1033,7 @@
     //
     //                            dispatch_async(dispatch_get_main_queue(), ^{
     //
-    //                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+    //                                [waitalert dismissViewControllerAnimated:YES completion:nil];
     //
     //                                if([[editor_json valueForKey:@"result"] intValue]==2)
     //                                {
@@ -1203,14 +1203,14 @@
 //                                                {
 //                                                    
 //                                                    if(/*!self.have_tail*/ true)
-//                                                    {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                                                    {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                                                        [upparams setValue:@"false" forKey:@"isHold"];
 //                                                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //                                                            
 //                                                            NSDictionary* editor_json = [RANetwork saveandcommit_Order:upparams];
 //                                                            
 //                                                            dispatch_async(dispatch_get_main_queue(), ^{
-//                                                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                                                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                                                
 //                                                                
 //                                                                if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1325,7 +1325,7 @@
 //                                                    //            [upparams setValue:@"true" forKey:@"isHold"];
 //                                                    //            else
 //                                                    //                [upparams setValue:@"false" forKey:@"isHold"];
-//                                                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                                                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                                                    
 //                                                    [upparams setValue:@"true" forKey:@"isHold"];
 //                                                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -1334,7 +1334,7 @@
 //                                                        
 //                                                        dispatch_async(dispatch_get_main_queue(), ^{
 //                                                            
-//                                                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                                            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                                            
 //                                                            if([[editor_json valueForKey:@"result"] intValue]==2)
 //                                                            {
@@ -1427,14 +1427,14 @@
 //                    {
 //                        
 //                        if(/*!self.have_tail*/ true)
-//                        {UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                        {UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                            [upparams setValue:@"false" forKey:@"isHold"];
 //                            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //                                
 //                                NSDictionary* editor_json = [RANetwork saveandcommit_Order:upparams];
 //                                
 //                                dispatch_async(dispatch_get_main_queue(), ^{
-//                                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                    
 //                                    
 //                                    if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -1570,7 +1570,7 @@
 //                        //            [upparams setValue:@"true" forKey:@"isHold"];
 //                        //            else
 //                        //                [upparams setValue:@"false" forKey:@"isHold"];
-//                        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+//                        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
 //                        
 //                        [upparams setValue:@"true" forKey:@"isHold"];
 //                        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -1579,7 +1579,7 @@
 //                            
 //                            dispatch_async(dispatch_get_main_queue(), ^{
 //                                
-//                                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                                
 //                                if([[editor_json valueForKey:@"result"] intValue]==2)
 //                                {
@@ -1757,13 +1757,14 @@
         upparams[@"shipping"] = nil;
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Saving Order"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* editor_json = [RANetwork save_Order:upparams];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -2005,13 +2006,13 @@
             
             
             AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Release Order"];
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
                 NSDictionary* order_json = [RANetwork release_Order:appDelegate.order_code withScreen:nil];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     if([[order_json valueForKey:@"result"] intValue]==2)
                     {
                         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -2679,7 +2680,7 @@
 - (void)customer_commit_order:(NSMutableDictionary *)upparams {
     
 
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     
         if([upparams[@"shipping"] isEqualToString:@"Shipping To Be Quoted"]||[upparams[@"shipping"] isEqualToString:@"To Be Quoted"])
             upparams[@"shipping"] = nil;
@@ -2691,7 +2692,7 @@
             
             dispatch_async(dispatch_get_main_queue(), ^{
                 
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 if([[editor_json valueForKey:@"result"] intValue]==2)
                 {
@@ -2745,14 +2746,14 @@
 
 - (void)empolyee_commit_order:(NSMutableDictionary *)upparams {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Order Submission"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Order Submission"];
     [upparams setValue:@"false" forKey:@"isHold"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* editor_json = [RANetwork saveandcommit_Order:upparams];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)

+ 4 - 3
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioListViewController.m

@@ -667,13 +667,14 @@
             
             
             UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Remove Portfilio"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Remove Portfilio"];
                 
                 [RANetwork request_removeportfoliopdf:listid completionHandler:^(NSMutableDictionary *result) {
                     NSMutableDictionary* cart_json = result;
                     
                     
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     if([[cart_json valueForKey:@"result"] intValue]==2)
                     {
@@ -696,7 +697,7 @@
 //                    
 //                    dispatch_async(dispatch_get_main_queue(), ^{
 //                        
-//                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                        [waitalert dismissViewControllerAnimated:YES completion:nil];
 //                        
 //                        if([[cart_json valueForKey:@"result"] intValue]==2)
 //                        {

+ 14 - 13
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m

@@ -303,11 +303,12 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -358,7 +359,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -622,13 +623,13 @@
     [params setObject:pdf_url forKey:@"pdfUrl"];
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Processing"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Processing"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* editor_json = [RANetwork request_TearSheet:params];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -675,7 +676,7 @@
                     
                     NSString* del_ids = nil;
                     
-                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving..."];
+                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Saving..."];
                     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                         
                         
@@ -699,7 +700,7 @@
                         NSDictionary* json = [RANetwork save_TearSheet:params];
                         
                         dispatch_async(dispatch_get_main_queue(), ^{
-                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                            [waitalert dismissViewControllerAnimated:YES completion:nil];
                             
                             
                             if([[json valueForKey:@"result"] intValue]==2)
@@ -909,7 +910,7 @@
             vc.onSetValue = ^(int qty,double qty_p, double price, double discount , NSString* notes){
                 
                 
-                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Updating Quantity"];
+                UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Updating Quantity"];
                 
                 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                     
@@ -918,7 +919,7 @@
                     cart_json= [RANetwork portfolio_setPrice:[NSString stringWithFormat:@"%d",[[item_json valueForKey:@"item_id"] intValue]] price:price discount:discount QTY:qty  qty_p:qty_p notes:notes];
                     
                     dispatch_async(dispatch_get_main_queue(), ^{
-                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                        [waitalert dismissViewControllerAnimated:YES completion:nil];
                         
                         
                         if([[cart_json valueForKey:@"result"] intValue]==2)
@@ -1049,7 +1050,7 @@
         vc.onSetValue = ^(int qty,double qty_p,double price, double discount , NSString* notes){
             
             
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Updating Quantity"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Updating Quantity"];
             
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
@@ -1058,7 +1059,7 @@
                 cart_json= [RANetwork portfolio_setPrice:ids price:price discount:discount QTY:qty qty_p:qty_p notes:notes];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     
                     if([[cart_json valueForKey:@"result"] intValue]==2)
@@ -1602,7 +1603,7 @@
         vc.onSetValue = ^(int qty,double qty_p, double price, double discount , NSString* notes){
             
             
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Updating Quantity"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Updating Quantity"];
             
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
@@ -1611,7 +1612,7 @@
                 cart_json= [RANetwork portfolio_setPrice:[NSString stringWithFormat:@"%d",[[item_json valueForKey:@"item_id"] intValue]] price:price discount:discount QTY:qty  qty_p:qty_p notes:notes];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     
                     if([[cart_json valueForKey:@"result"] intValue]==2)

+ 8 - 6
RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.m

@@ -278,13 +278,15 @@
     
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Processing"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Processing"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* editor_json = [RANetwork request_TearSheet:upparams];
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
+            
             
             
             if([[editor_json valueForKey:@"result"] intValue]==2)
@@ -362,7 +364,7 @@
                     if(bremove)
                         del_ids=[self.params valueForKey:@"item_ids"];
                     
-                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving..."];
+                    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Saving..."];
                     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                         
                         
@@ -386,7 +388,7 @@
                         NSDictionary* json = [RANetwork save_TearSheet:upparams];
                         
                         dispatch_async(dispatch_get_main_queue(), ^{
-                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                            [waitalert dismissViewControllerAnimated:YES completion:nil];
                             
                             
                             if([[json valueForKey:@"result"] intValue]==2)
@@ -673,7 +675,7 @@
             self.savebtn.enabled =false;
             
             
-            UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Processing"];
+            UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Processing"];
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
                 
@@ -685,7 +687,7 @@
                 NSDictionary* editor_json = [RANetwork direct_save_TearSheet:upparams];
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    [waitalert dismissViewControllerAnimated:YES completion:nil];
                     
                     
                     if([[editor_json valueForKey:@"result"] intValue]==2)

+ 9 - 9
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m

@@ -957,11 +957,11 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1012,7 +1012,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1194,7 +1194,7 @@
     
     NSString * ids = [checked componentsJoinedByString:@","];
     self.addCartBtn.enabled = false;
-     UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Cart"];
+     UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Cart"];
 
     
     
@@ -1209,7 +1209,7 @@
         }
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
 
             self.addCartBtn.enabled = true;
             
@@ -1335,7 +1335,7 @@
     NSString * ids = [checked componentsJoinedByString:@","];
     self.addPortfolioBtn.enabled =false;
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Portfolio"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Portfolio"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* return_json = nil;
@@ -1349,7 +1349,7 @@
         
         dispatch_async(dispatch_get_main_queue(), ^{
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             self.addPortfolioBtn.enabled =true;
             
@@ -1435,7 +1435,7 @@
     self.addWishBtn.enabled =false;
     
     
-     UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Wish List"];
+     UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Wish List"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* return_json = nil;
@@ -1448,7 +1448,7 @@
 
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             self.addWishBtn.enabled =true;
             
             if([[return_json valueForKey:@"result"] intValue]==2)

+ 16 - 9
RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m

@@ -669,11 +669,14 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+        
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -724,7 +727,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -909,7 +912,7 @@
     self.addCartBtn.enabled = false;
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Cart"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Cart"];
     
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
@@ -924,7 +927,9 @@
         
         dispatch_async(dispatch_get_main_queue(), ^{
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
+            
             
             self.addCartBtn.enabled = true;
             
@@ -1044,7 +1049,7 @@
     NSString * ids = [checked componentsJoinedByString:@","];
     self.addPortfolioBtn.enabled =false;
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Portfolio"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Portfolio"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* return_json = nil;
@@ -1057,7 +1062,8 @@
 
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             self.addPortfolioBtn.enabled =true;
             
@@ -1151,7 +1157,7 @@
     NSString * ids = [checked componentsJoinedByString:@","];
     self.addWishBtn.enabled =false;
     
-     UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Add Models To Wish List"];
+     UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Add Models To Wish List"];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
         NSDictionary* return_json = nil;
@@ -1165,7 +1171,8 @@
         
         dispatch_async(dispatch_get_main_queue(), ^{
             
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
 
             self.addWishBtn.enabled =true;
             

+ 3 - 2
RedAnt ERP Mobile/common/Functions/sidemenu/CacheViewController.m

@@ -100,7 +100,7 @@
     
     
     
-    UIAlertView * alert = [RAUtils waiting_alert:@"Deleting..." title:nil];
+    UIAlertController * alert = [RAUtils waiting_alert:self message:@"Deleting..." title:nil];
     
 //    UIAlertView * alert=[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Deleting", nil) message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
     
@@ -131,7 +131,8 @@
 //    [self.mum stopAnimating];
     
     
-     [alert dismissWithClickedButtonIndex:0 animated:FALSE];
+    [alert dismissViewControllerAnimated:YES completion:nil];
+//     [alert dismissWithClickedButtonIndex:0 animated:FALSE];
     
     [self.mum startAnimating];
     float size=[RAUtils fileSizeForDir:cachefolder];

+ 3 - 3
RedAnt ERP Mobile/common/Functions/sidemenu/FunctionTestViewController.m

@@ -94,7 +94,7 @@ self.airPrinterController = [UIPrintInteractionController sharedPrintController]
 {
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"preparing print..."];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"preparing print..."];
     
     UIPrintInteractionController* airPrinterController=[UIPrintInteractionController sharedPrintController];
     UIPrintInfo *printInfo = [UIPrintInfo printInfo];
@@ -125,7 +125,7 @@ self.airPrinterController = [UIPrintInteractionController sharedPrintController]
     
     if(appDelegate.printerURL==nil)
     {
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
         if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1)
         {
             UIPrinterPickerController *printPicker = [UIPrinterPickerController printerPickerControllerWithInitiallySelectedPrinter:nil];
@@ -183,7 +183,7 @@ self.airPrinterController = [UIPrintInteractionController sharedPrintController]
         UIPrinter *airPrinter = [UIPrinter printerWithURL:[NSURL URLWithString:appDelegate.printerURL] ];///*self.printer;*/
         [airPrinter contactPrinter:^(BOOL available)
          {
-             [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+             [waitalert dismissViewControllerAnimated:YES completion:nil];
              
              if (available&& appDelegate.printerURL.length>0)
              {

+ 11 - 3
RedAnt ERP Mobile/common/Functions/sidemenu/LoginViewController.m

@@ -245,12 +245,20 @@
     
     
     self.btnLogin.enabled = false;
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Sign in"];
+//    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Sign in"];
+    
+  
+    UIAlertController* waitalert= [RAUtils waiting_alert:self title:@"Sign in"];
+//        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Sign in" message:@"Please wait..." preferredStyle:UIAlertControllerStyleAlert];
+//        [self presentViewController:alertController animated:YES completion:nil];
+    
     
     [RANetwork request_login:user password:password completionHandler:^(NSMutableDictionary *result) {
         int ret=[result[@"result"] intValue];
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:true completion:nil];
+        
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         self.btnLogin.enabled = true;
         
         if(ret==RESULT_TRUE)
@@ -448,7 +456,7 @@
 //        int ret=[RANetwork  Authorize:user password:password];
 //        
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //            self.btnLogin.enabled = true;
 //            
 //            if(ret==RESULT_TRUE)

+ 8 - 7
RedAnt ERP Mobile/common/Functions/sidemenu/UserListViewController.m

@@ -110,7 +110,7 @@
             return;
         }
         
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Switch user"];
+        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Switch user"];
         
         [RANetwork request_logout:^(NSMutableDictionary *result) {
             
@@ -149,13 +149,14 @@
             [appDelegate Logout];
             [appDelegate checkLogin:NO];
             
-            //                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            //                [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             [RANetwork request_login:user password:password completionHandler:^(NSMutableDictionary *result) {
                 int ret=[result[@"result"]intValue];
                 
                 
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                [waitalert dismissViewControllerAnimated:YES completion:nil];
+//                [waitalert dismissViewControllerAnimated:YES completion:nil];
                 
                 if(ret==RESULT_TRUE)
                 {
@@ -247,7 +248,7 @@
             //
             //                    dispatch_async(dispatch_get_main_queue(), ^{
             //
-            //                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            //                        [waitalert dismissViewControllerAnimated:YES completion:nil];
             //
             //                        if(ret==RESULT_TRUE)
             //                        {
@@ -376,13 +377,13 @@
 //                [appDelegate Logout];
 //                [appDelegate checkLogin:NO];
 //
-////                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+////                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                [RANetwork request_login:user password:password completionHandler:^(NSMutableDictionary *result) {
 //                    int ret=[result[@"result"]intValue];
 //
 //
-//                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                    [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //                    if(ret==RESULT_TRUE)
 //                    {
@@ -474,7 +475,7 @@
 ////
 ////                    dispatch_async(dispatch_get_main_queue(), ^{
 ////
-////                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+////                        [waitalert dismissViewControllerAnimated:YES completion:nil];
 ////
 ////                        if(ret==RESULT_TRUE)
 ////                        {

+ 3 - 2
RedAnt ERP Mobile/common/Functions/signature/SignatureView.m

@@ -690,7 +690,7 @@ static PPSSignaturePoint ViewPointToGL(CGPoint viewPoint, CGRect bounds, GLKVect
     UIImage *screenshot = [self snapshot];
     if(screenshot==nil)
     {
-        int debug = 1;
+        NSAssert(false, @"screenshot is null");
     }
     float x = _mixPoint.x - MAX_LINEWIDTH /2.0;
     float y = _mixPoint.y - MAX_LINEWIDTH / 2.0;
@@ -707,7 +707,8 @@ static PPSSignaturePoint ViewPointToGL(CGPoint viewPoint, CGRect bounds, GLKVect
     CGImageRelease(imagePartRef);;
     if(cropImage==nil)
     {
-        int debug = 1;
+        NSAssert(false, @"Signature2Image: cropImage is nil");
+//        int debug = 1;
     }
     
     return cropImage;

+ 8 - 5
RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m

@@ -331,12 +331,14 @@
 -(void) neworder
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
     
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json =result;
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+        
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         
         if([[return_json valueForKey:@"result"] intValue]==2)
@@ -372,7 +374,7 @@
 //        NSDictionary* return_json = [RANetwork new_Order];
 //
 //        dispatch_async(dispatch_get_main_queue(), ^{
-//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //
 //            if([[return_json valueForKey:@"result"] intValue]==2)
@@ -1377,13 +1379,14 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
             // 验证是邮件地址,发送邮件
             [weakVC dismissViewControllerAnimated:YES completion:^{
                 
-                UIAlertView *waitting_alert = [RAUtils waiting_alert:@"Sending Email" title:@"Waiting"];
+                UIAlertController *waitting_alert = [RAUtils waiting_alert:self title:@"Sending Email"];
                 
                 [RANetwork request_emailwishlist:text completionHandler:^(NSMutableDictionary *result) {
                     DebugLog(@"email wishlist result: %@",result);
                     
                         
-                        [waitting_alert dismissWithClickedButtonIndex:0 animated:YES];
+                    [waitting_alert dismissViewControllerAnimated:YES completion:nil];
+//                        [waitting_alert dismissWithClickedButtonIndex:0 animated:YES];
                         
                         if ([[result objectForKey:@"result"] integerValue] != RESULT_TRUE) {
                             

+ 1 - 1
RedAnt ERP Mobile/common/JKLock/JKLockButton.m

@@ -23,7 +23,7 @@
     _number = number;
     
     if (number >= 0 && number < 10) {
-        [self setTitle:[NSString stringWithFormat:@"%d",number] forState:UIControlStateNormal];
+        [self setTitle:[NSString stringWithFormat:@"%ld",(long)number] forState:UIControlStateNormal];
         self.titleLabel.font = [UIFont systemFontOfSize:17.0f];
     } else {
         [self setTitle:@"delete" forState:UIControlStateNormal];

+ 1 - 1
RedAnt ERP Mobile/common/JKLock/JKLockController.m

@@ -251,7 +251,7 @@
         JKDotView *dot = [self.dotArray objectAtIndex:self.index];
         dot.state = JKDotStateSelected;
         
-        self.input = [self.input stringByAppendingString:[NSString stringWithFormat:@"%d",number]];
+        self.input = [self.input stringByAppendingString:[NSString stringWithFormat:@"%ld",(long)number]];
         self.index++;
     }
     

+ 2 - 1
RedAnt ERP Mobile/common/PhotoList/Controller/ContentPreviewController.m

@@ -340,7 +340,7 @@
     
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
        
-        AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+        
         
         NSString* img_url = [item_json valueForKey:@"s"];
         NSString* type = item_json[@"type"];
@@ -376,6 +376,7 @@
             NSData*  downloadimg_data = nil;
             BOOL offline_mode = NO;
 #ifdef OFFLINE_MODE
+            AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
             offline_mode = appDelegate.offline_mode;
 #endif
             if (!offline_mode) {

+ 8 - 4
RedAnt ERP Mobile/common/Price Setting/PriceSettingViewController.m

@@ -119,11 +119,13 @@
 
 - (IBAction)calculatePriceButtonClick:(UIButton *)sender {
 
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Load Data"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Load Data"];
     
     NSDictionary *dic = [RANetwork get_npd_shop_givenPrice];
 
-    [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+//    [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+    [waitalert dismissViewControllerAnimated:YES completion:nil];
+    
     
     if ([[dic objectForKey:@"result"] integerValue] == 2) {
     
@@ -209,11 +211,13 @@
 
 - (IBAction)saveButtonClick:(UIButton *)sender {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Set PriceType"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Set PriceType"];
     
     NSDictionary *dic = [RANetwork set_npd_shop_price_type:self.priceType];
     
-    [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+//    [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+    [waitalert dismissViewControllerAnimated:YES completion:nil];
+    
     // 成功
     if ([[dic objectForKey:@"result"] integerValue] == 2) {
         

+ 4 - 2
RedAnt ERP Mobile/common/Price Setting/SetCategoryPriceController.m

@@ -223,11 +223,13 @@
     
     if (rightDiscount) {
         
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Set Price"];
+        UIAlertController* waitalert = [RAUtils waiting_alert:self title:@"Set Price"];
+//        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Set Price"];
         
         NSDictionary *dic = [RANetwork set_npd_shop_givenPrice:@{@"base_price" : [NSString stringWithFormat:@"%ld",self.priceType],@"discount" : discount,@"category_id" : @(self.categoryID)}.mutableCopy];
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+//        [waitalert dismissWithClickedButtonIndex:0 animated:YES];
         
         if ([[dic objectForKey:@"result"] integerValue] == 2) {
             

+ 3 - 1
RedAnt ERP Mobile/common/RAUtils.h

@@ -28,7 +28,9 @@
 +(NSDictionary*) error_json :(int)code err_msg:(NSString*)msg;
 +(void) message_alert :(NSString*) msg title:(NSString*) title controller:(UIViewController*) vc;
 +(void) alert_view :(NSString*) msg title:(NSString*) title ;
-+(UIAlertView * ) waiting_alert :(NSString*) msg title:(NSString*) title;
+//+(UIAlertView * ) waiting_alert :(NSString*) msg title:(NSString*) title;
++(UIAlertController*) waiting_alert:(UIViewController*)parent title:(NSString*) title;
++(UIAlertController*) waiting_alert:(UIViewController*)parent message:(NSString*)msg title:(NSString*) title;
 + (float)fileSizeForDir:(NSString*)path;//计算文件夹下文件的总大小;
 +(void) deletefiles :(NSString*) path;
 +(UIColor*) strColor:(NSString*) color;

+ 48 - 32
RedAnt ERP Mobile/common/RAUtils.m

@@ -481,13 +481,13 @@
 //    
 //    //    UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
 //    //
-//    //        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Delete Order"];
+//    //        UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Delete Order"];
 //    //        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //    //
 //    //            NSDictionary* return_json = [iSalesNetwork delete_Order:orderid];
 //    //
 //    //            dispatch_async(dispatch_get_main_queue(), ^{
-//    //                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//    //                [waitalert dismissViewControllerAnimated:YES completion:nil];
 //    //
 //    //
 //    //                if([[return_json valueForKey:@"result"] intValue]==2)
@@ -557,38 +557,54 @@
     DebugLog(@"手机剩余存储空间为:%qi MB" ,freespace/1024/1024);
     return freespace/1024/1024;
 }
-+(UIAlertView * ) waiting_alert :(NSString*) msg title:(NSString*) title
+
++(UIAlertController*) waiting_alert:(UIViewController*)parent title:(NSString*) title
 {
-    if(title==nil)
-        title = @"Please Wait";
-    if(msg==nil)
-        msg= @"Waiting...";
-    NSAssert(msg!=nil, @"error message from json is nil");
-    UIAlertView * alert = [[UIAlertView alloc] initWithTitle:title message:msg delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
-    [alert show];
-    //
-    //
-    //    UIActivityIndicatorView *aiView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125.0, 80.0, 30.0, 30.0)];
-    //    aiView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
-    // //   check if os version is 7 or above. ios7.0及以上UIAlertView弃用了addSubview方法
-    ////    if ([[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending) {
-    ////        [alert setValue:aiView forKey:@"accessoryView"];
-    ////    }else{
-    ////        [alert addSubview:aiView];
-    ////    }
-    //
-    //    aiView.hidden = false;
-    //    aiView.hidesWhenStopped = false;
-    //    [aiView startAnimating];
-    //
-    //[alert addSubview:aiView];
-    
-    return alert;
-    //return nil;
-    // return alert;
-    //        UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Error!" message:@"User&Password can not be empty!" delegate:nil cancelButtonTitle:NSLocalizedString(@"ok", nil) , nil];
-    //[alert show];
+    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:@"Please wait..." preferredStyle:UIAlertControllerStyleAlert];
+    [parent presentViewController:alertController animated:YES completion:nil];
+    return alertController;
+
+}
+
++(UIAlertController*) waiting_alert:(UIViewController*)parent message:(NSString*)msg title:(NSString*) title
+{
+    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
+    [parent presentViewController:alertController animated:YES completion:nil];
+    return alertController;
+
 }
+//+(UIAlertView * ) waiting_alert :(NSString*) msg title:(NSString*) title
+//{
+//    if(title==nil)
+//        title = @"Please Wait";
+//    if(msg==nil)
+//        msg= @"Waiting...";
+//    NSAssert(msg!=nil, @"error message from json is nil");
+//    UIAlertView * alert = [[UIAlertView alloc] initWithTitle:title message:msg delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
+//    [alert show];
+//    //
+//    //
+//    //    UIActivityIndicatorView *aiView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125.0, 80.0, 30.0, 30.0)];
+//    //    aiView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
+//    // //   check if os version is 7 or above. ios7.0及以上UIAlertView弃用了addSubview方法
+//    ////    if ([[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending) {
+//    ////        [alert setValue:aiView forKey:@"accessoryView"];
+//    ////    }else{
+//    ////        [alert addSubview:aiView];
+//    ////    }
+//    //
+//    //    aiView.hidden = false;
+//    //    aiView.hidesWhenStopped = false;
+//    //    [aiView startAnimating];
+//    //
+//    //[alert addSubview:aiView];
+//
+//    return alert;
+//    //return nil;
+//    // return alert;
+//    //        UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Error!" message:@"User&Password can not be empty!" delegate:nil cancelButtonTitle:NSLocalizedString(@"ok", nil) , nil];
+//    //[alert show];
+//}
 +(NSDictionary*) device_info
 {
     

+ 1 - 1
RedAnt ERP Mobile/common/TextUtils.m

@@ -68,7 +68,7 @@
     if( [phone rangeOfCharacterFromSet:[NSCharacterSet letterCharacterSet] ].location==NSNotFound )
     {
         const char* string = [phone UTF8String];
-        int length = [phone lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
+        long length = [phone lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
         if( [[NSString stringWithCString:string length:1] intValue]==1 )
         {
             if( length > 11 )

+ 45 - 21
RedAnt ERP Mobile/common/categoryMenu_RATree/RAViewController.m

@@ -78,32 +78,56 @@
             }
     }];
     
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        
+    [RANetwork request_category:^(NSMutableDictionary *result) {
+        NSDictionary* category=result;
         
-        NSDictionary* category=[RANetwork request_Cagegory];
         
-        dispatch_async(dispatch_get_main_queue(), ^{
-            
-            if([[category valueForKey:@"result"] intValue]==2)
+        if([[category valueForKey:@"result"] intValue]==2)
+        {
+            appDelegate.categoryMenu = category;
+            [self SetMenu:appDelegate.categoryMenu ];
+        }
+        else
+            if([[category valueForKey:@"result"] intValue]==RESULT_NET_ERROR)
             {
-                appDelegate.categoryMenu = category;
-                [self SetMenu:appDelegate.categoryMenu ];
+                [self SetMenu:nil ];
             }
             else
-                if([[category valueForKey:@"result"] intValue]==RESULT_NET_ERROR)
-                {
-                    [self SetMenu:nil ];
-                }
-                else
-                {
-                    [RAUtils message_alert:[category valueForKey:@"err_msg"]  title:@"Load Category Menu" controller:self] ;
-                }
-            
-            
-            
-        });
-    });
+            {
+                [RAUtils message_alert:[category valueForKey:@"err_msg"]  title:@"Load Category Menu" controller:self] ;
+            }
+        
+        
+        
+        
+    }];
+    
+//    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+//
+//
+//        NSDictionary* category=[RANetwork request_Cagegory];
+//
+//        dispatch_async(dispatch_get_main_queue(), ^{
+//
+//            if([[category valueForKey:@"result"] intValue]==2)
+//            {
+//                appDelegate.categoryMenu = category;
+//                [self SetMenu:appDelegate.categoryMenu ];
+//            }
+//            else
+//                if([[category valueForKey:@"result"] intValue]==RESULT_NET_ERROR)
+//                {
+//                    [self SetMenu:nil ];
+//                }
+//                else
+//                {
+//                    [RAUtils message_alert:[category valueForKey:@"err_msg"]  title:@"Load Category Menu" controller:self] ;
+//                }
+//
+//
+//
+//        });
+//    });
     
     
     

+ 1 - 1
RedAnt ERP Mobile/common/customUI/ImageScrollerView.h

@@ -18,7 +18,7 @@ typedef NS_ENUM(NSInteger, MRImgLocation) {
 {
     NSDictionary* _imgViewDic;   // 展示板组
 }
-@property int curIndex;     // 当前显示图片在数据源中的下标
+@property (nonatomic) int curIndex;     // 当前显示图片在数据源中的下标
 
 @property(nonatomic ,strong)NSMutableArray *imgSource;
 

+ 4 - 4
RedAnt ERP Mobile/common/customUI/ImageScrollerView.m

@@ -44,7 +44,7 @@
         [self setImgSource:imgSource];
         
         // 设置图片下标
-        [self setCurIndex:index];
+        [self setCurIndex:(int)index];
         
         
     }
@@ -128,7 +128,7 @@
         [self setImgSource:data];
         
         // 设置图片下标
-        [self setCurIndex:index];
+        [self setCurIndex:(int)index];
         
         
     }
@@ -255,12 +255,12 @@
     [self setContentOffset:CGPointMake(size.width, 0)];
 }
 
-- (void)setCurIndex:(NSInteger)curIndex{
+- (void)setCurIndex:(int)curIndex{
     
     if (_imgSource.count > curIndex && curIndex >= 0) {
         _curIndex = curIndex;
     } else if (curIndex == -1){
-        _curIndex = _imgSource.count - 1;
+        _curIndex = (int)_imgSource.count - 1;
     } else if (curIndex == _imgSource.count){
         _curIndex = 0;
     }

+ 3 - 3
RedAnt ERP Mobile/common/customUI/ImageScrollerViewController.m

@@ -17,7 +17,7 @@
 
 -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
-    UIApplication * app = [UIApplication sharedApplication];
+//    UIApplication * app = [UIApplication sharedApplication];
 //    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
 //    [appDelegate didRotated];
     UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
@@ -57,7 +57,7 @@
         self=[self init];
         
         _data = data;
-        _index = index;
+        _index = (int)index;
     }
 
     
@@ -82,7 +82,7 @@
  self.use_url =true;
         
         _data = urls;
-        _index = index;
+        _index = (int)index;
     }
     
     

+ 1 - 1
RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m

@@ -347,7 +347,7 @@
 //
 //
 //            }
-//            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//            //  [waitalert dismissViewControllerAnimated:YES completion:nil];
 //        }];
 //
 //

+ 3 - 3
RedAnt ERP Mobile/common/data_provider/iSalesDB.m

@@ -72,7 +72,7 @@ void encryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
             
             //DebugLog (@"%@", [[[NSString alloc] initWithUTF8String:(char *) rString] autorelease]);
             
-            sqlite3_result_text(context, rString, strlen(rString) * sizeof(char), NULL);
+            sqlite3_result_text(context, rString, (int)strlen(rString) * sizeof(char), NULL);
             break;
         }
         default: {
@@ -564,7 +564,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
 {
     if(path.length==0)
         return nil;
-    bool b=        [Singleton sharedInstance].homeItemClick ;
+//    bool b=        [Singleton sharedInstance].homeItemClick ;
     path=[path stringByReplacingOccurrencesOfString:@"https://" withString:@""];
     path=[path stringByReplacingOccurrencesOfString:@"http://" withString:@""];
     //    path=[path stringByReplacingOccurrencesOfString:filename withString:@""];
@@ -750,7 +750,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
         NSString* create_offline_pdf_trigger=@"CREATE TRIGGER  if not exists offline_pdf_insert after insert on offline_pdf BEGIN select offline_dirty();  UPDATE offline_pdf SET modify_time= datetime('now', 'localtime') WHERE _id=new._id;END;CREATE TRIGGER  if not exists offline_pdf_update after update on offline_pdf BEGIN select offline_dirty();  UPDATE offline_pdf SET modify_time= datetime('now', 'localtime'), is_dirty = 1 WHERE _id=new._id; END;CREATE TRIGGER if not exists offline_pdf_delete after DELETE ON offline_pdf BEGIN select offline_dirty(); END;";
     
         NSString* create_offline_portfolio_trigger=@"CREATE TRIGGER  if not exists offline_portfolio_insert after insert on offline_portfolio BEGIN select offline_dirty();  UPDATE offline_portfolio SET modify_time= datetime('now', 'localtime') WHERE _id=new._id;END;CREATE TRIGGER  if not exists offline_portfolio_update after update on offline_portfolio BEGIN select offline_dirty();  UPDATE offline_portfolio SET modify_time= datetime('now', 'localtime'), is_dirty = 1 WHERE _id=new._id; END;CREATE TRIGGER if not exists offline_portfolio_delete after DELETE ON offline_portfolio BEGIN select offline_dirty(); END;";
-    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+ //   AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     
     //if(appDelegate.offline_mode)
     {

+ 6 - 6
RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m

@@ -520,11 +520,11 @@
             //for (int i = 0; i < match.numberOfRanges/2; ++i)
             {
                 int i=0;
-                DebugLog(@"%d->range with richtext label: %d,%d",i, [match rangeAtIndex:i].location,[match rangeAtIndex:i].length);
-                DebugLog(@"%d-> range of text: %d,%d ",i+1, [match rangeAtIndex:i+1].location,[match rangeAtIndex:i+1].length);
+                DebugLog(@"%d->range with richtext label: %lu,%lu",i, (unsigned long)[match rangeAtIndex:i].location,(unsigned long)[match rangeAtIndex:i].length);
+                DebugLog(@"%d-> range of text: %lu,%lu ",i+1, (unsigned long)[match rangeAtIndex:i+1].location,(unsigned long)[match rangeAtIndex:i+1].length);
                 
                 
-                DebugLog(@"string length: %d",string.string.length);
+                DebugLog(@"string length: %lu",(unsigned long)string.string.length);
                 
                 
 //                CTFontRef ctfont_bold = [self CreateFont:font size:size bold:true];
@@ -748,7 +748,7 @@
     
     if([self.text isEqualToString:DEBUG_STRING_VALUE1])
     {
-        bool debug=true;
+      //  bool debug=true;
         NSLog(@"textdrawable text:%@",self.text);
         NSLog(@"string %@",string);
         //        NSLog(@"compute size %@", NSStringFromCGSize(CGSizeMake(self.rect.size.width-self.margin_left-self.margin_right, MAXFLOAT)) );
@@ -806,7 +806,7 @@
     
     if([self.text isEqualToString:DEBUG_STRING_VALUE1])
     {
-        bool debug=true;
+//        bool debug=true;
         NSLog(@"textdrawable text:%@",self.text);
         NSLog(@"tmpSize %@", NSStringFromCGSize(tmpSize) );
         NSLog(@"p_rect %@", NSStringFromCGRect(p_rect) );
@@ -822,7 +822,7 @@
     
     if([self.text isEqualToString:DEBUG_STRING_VALUE1])
     {
-        bool debug=true;
+   //     bool debug=true;
         NSLog(@"textdrawable text:%@",self.text);
         NSLog(@"tmpSize %@", NSStringFromCGSize(tmpSize) );
         NSLog(@"p_rect %@", NSStringFromCGRect(p_rect) );

+ 3 - 3
RedAnt ERP Mobile/common/photoStack/PhotoStackView.m

@@ -197,7 +197,7 @@ static CGFloat const PhotoRotationOffsetDefault = 4.0f;
     NSInteger min = -(self.rotationOffset);
     NSInteger max = self.rotationOffset;
     
-    NSInteger degrees = (arc4random_uniform(max-min+1)) + min;
+    NSInteger degrees = (arc4random_uniform((int)(max-min+1))) + min;
     [self rotatePhoto:photo degrees:degrees animated:animated];
     
 }
@@ -239,7 +239,7 @@ static CGFloat const PhotoRotationOffsetDefault = 4.0f;
         
     } else if(gesture.state == UIGestureRecognizerStateEnded || gesture.state == UIGestureRecognizerStateCancelled) {
         
-        if(abs(velocity.x) > 200) {
+        if(abs((int)velocity.x) > 200) {
             [self flickAway:topPhoto withVelocity:velocity];
             
         } else {
@@ -264,7 +264,7 @@ static CGFloat const PhotoRotationOffsetDefault = 4.0f;
     if ([self.delegate respondsToSelector:@selector(photoStackView:didSelectPhotoAtIndex:)]) {
         // No need to highlight the photo if delegate does not implement a
         // selection handler (ie. nothing happens when they tap it)
-        [self sendActionsForControlEvents:UIControlStateHighlighted];
+        [self sendActionsForControlEvents:UIControlEventTouchDown];
     }
 }
 

+ 8 - 1
RedAnt ERP Mobile/common/zip/ZipArchive.mm

@@ -7,6 +7,13 @@
 //  Copyright 2008  Inc. All rights reserved.
 //
 
+//消除三方库警告
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wshorten-64-to-32"
+#pragma clang diagnostic ignored "-Wundeclared-selector"
+//#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+//#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
 #import "ZipArchive.h"
 #import "zlib.h"
 #import "zconf.h"
@@ -157,7 +164,7 @@
 		unz_global_info  globalInfo = {0};
 		if( unzGetGlobalInfo(_unzFile, &globalInfo )==UNZ_OK )
 		{
-			NSLog([NSString stringWithFormat:@"%d entries in the zip file",globalInfo.number_entry] );
+            NSLog(@"%@", [NSString stringWithFormat:@"%lu entries in the zip file",globalInfo.number_entry] );
 		}
 	}
 	return _unzFile!=NULL;

+ 2 - 0
RedAnt ERP Mobile/common/zip/minizip/mztools.c

@@ -5,6 +5,8 @@
 */
 
 /* Code */
+#pragma clang diagnostic ignored "-Wstrict-prototypes"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 2 - 1
RedAnt ERP Mobile/common/zip/minizip/unzip.c

@@ -34,7 +34,8 @@ woven in by Terry Thorsen 1/2003.
   version without encryption capabilities).
  */
 
-
+#pragma clang diagnostic ignored "-Wparentheses-equality"
+#pragma clang diagnostic ignored "-Wunused-variable"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 1 - 1
RedAnt ERP Mobile/common/zip/minizip/zip.c

@@ -9,7 +9,7 @@
    Read zip.h for more info
 */
 
-
+#pragma clang diagnostic ignored "-Wunused-function"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 0 - 16
RedAnt ERP Mobile/iSales-GATIT.xcodeproj/project.pbxproj

@@ -59,15 +59,11 @@
 		42B309791E45BA32007AFC62 /* status_filter_cadedate_po.json in Resources */ = {isa = PBXBuildFile; fileRef = 42B309781E45BA32007AFC62 /* status_filter_cadedate_po.json */; };
 		42BEF34F1E89FE1100632AB6 /* FirebaseAnalytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF3241E89FE1100632AB6 /* FirebaseAnalytics.framework */; };
 		42BEF3501E89FE1100632AB6 /* FirebaseCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF3271E89FE1100632AB6 /* FirebaseCore.framework */; };
-		42BEF3511E89FE1200632AB6 /* CHANGELOG.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF3291E89FE1100632AB6 /* CHANGELOG.md */; };
 		42BEF3521E89FE1200632AB6 /* FirebaseInstanceID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF32B1E89FE1100632AB6 /* FirebaseInstanceID.framework */; };
-		42BEF3531E89FE1200632AB6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF32C1E89FE1100632AB6 /* README.md */; };
 		42BEF3541E89FE1200632AB6 /* GGLAnalytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF32F1E89FE1100632AB6 /* GGLAnalytics.framework */; };
 		42BEF3551E89FE1200632AB6 /* GGLCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF3301E89FE1100632AB6 /* GGLCore.framework */; };
-		42BEF3561E89FE1200632AB6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF3391E89FE1100632AB6 /* README.md */; };
 		42BEF3571E89FE1200632AB6 /* libGoogleAnalytics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF33C1E89FE1100632AB6 /* libGoogleAnalytics.a */; };
 		42BEF3581E89FE1200632AB6 /* GTMNSData+zlib.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF34B1E89FE1100632AB6 /* GTMNSData+zlib.m */; };
-		42BEF35A1E89FE1200632AB6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF34E1E89FE1100632AB6 /* README.md */; };
 		42BEF35D1E89FECD00632AB6 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF35C1E89FECD00632AB6 /* SystemConfiguration.framework */; };
 		42BEF35F1E89FEE300632AB6 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF35E1E89FEE300632AB6 /* CoreData.framework */; };
 		42BEF3621E8A005800632AB6 /* GoogleAnalyst.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF3611E8A005800632AB6 /* GoogleAnalyst.m */; };
@@ -386,9 +382,7 @@
 		42B309781E45BA32007AFC62 /* status_filter_cadedate_po.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = status_filter_cadedate_po.json; path = common/Functions/order/status_filter_cadedate_po.json; sourceTree = SOURCE_ROOT; };
 		42BEF3241E89FE1100632AB6 /* FirebaseAnalytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseAnalytics.framework; sourceTree = "<group>"; };
 		42BEF3271E89FE1100632AB6 /* FirebaseCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = "<group>"; };
-		42BEF3291E89FE1100632AB6 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
 		42BEF32B1E89FE1100632AB6 /* FirebaseInstanceID.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseInstanceID.framework; sourceTree = "<group>"; };
-		42BEF32C1E89FE1100632AB6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
 		42BEF32F1E89FE1100632AB6 /* GGLAnalytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GGLAnalytics.framework; sourceTree = "<group>"; };
 		42BEF3301E89FE1100632AB6 /* GGLCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GGLCore.framework; sourceTree = "<group>"; };
 		42BEF3321E89FE1100632AB6 /* Analytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Analytics.h; sourceTree = "<group>"; };
@@ -397,7 +391,6 @@
 		42BEF3361E89FE1100632AB6 /* Analytics-Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Analytics-Module.h"; sourceTree = "<group>"; };
 		42BEF3371E89FE1100632AB6 /* Core-Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Core-Module.h"; sourceTree = "<group>"; };
 		42BEF3381E89FE1100632AB6 /* SignIn-Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SignIn-Module.h"; sourceTree = "<group>"; };
-		42BEF3391E89FE1100632AB6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
 		42BEF33C1E89FE1100632AB6 /* libGoogleAnalytics.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGoogleAnalytics.a; sourceTree = "<group>"; };
 		42BEF33E1E89FE1100632AB6 /* GAI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GAI.h; sourceTree = "<group>"; };
 		42BEF33F1E89FE1100632AB6 /* GAIDictionaryBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GAIDictionaryBuilder.h; sourceTree = "<group>"; };
@@ -412,7 +405,6 @@
 		42BEF34A1E89FE1100632AB6 /* GTMNSData+zlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMNSData+zlib.h"; sourceTree = "<group>"; };
 		42BEF34B1E89FE1100632AB6 /* GTMNSData+zlib.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSData+zlib.m"; sourceTree = "<group>"; };
 		42BEF34C1E89FE1100632AB6 /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMDefines.h; sourceTree = "<group>"; };
-		42BEF34E1E89FE1100632AB6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
 		42BEF35C1E89FECD00632AB6 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
 		42BEF35E1E89FEE300632AB6 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
 		42BEF3601E8A005800632AB6 /* GoogleAnalyst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GoogleAnalyst.h; sourceTree = "<group>"; };
@@ -997,9 +989,7 @@
 		42BEF3281E89FE1100632AB6 /* FirebaseInstanceID */ = {
 			isa = PBXGroup;
 			children = (
-				42BEF3291E89FE1100632AB6 /* CHANGELOG.md */,
 				42BEF32A1E89FE1100632AB6 /* Frameworks */,
-				42BEF32C1E89FE1100632AB6 /* README.md */,
 			);
 			path = FirebaseInstanceID;
 			sourceTree = "<group>";
@@ -1017,7 +1007,6 @@
 			children = (
 				42BEF32E1E89FE1100632AB6 /* Frameworks */,
 				42BEF3311E89FE1100632AB6 /* Headers */,
-				42BEF3391E89FE1100632AB6 /* README.md */,
 			);
 			path = Google;
 			sourceTree = "<group>";
@@ -1092,7 +1081,6 @@
 			children = (
 				42BEF3491E89FE1100632AB6 /* Foundation */,
 				42BEF34C1E89FE1100632AB6 /* GTMDefines.h */,
-				42BEF34E1E89FE1100632AB6 /* README.md */,
 			);
 			path = GoogleToolboxForMac;
 			sourceTree = "<group>";
@@ -2202,7 +2190,6 @@
 				712AFEDF1DBA050200254965 /* TextDrawable.m in Sources */,
 				7162A5611C58724700AB630E /* CustomerInfoViewController.m in Sources */,
 				71DF74681C575E7900F2789C /* EnumSelectViewController.m in Sources */,
-				42BEF3531E89FE1200632AB6 /* README.md in Sources */,
 				428980471E249339005F1BD8 /* JKLockController.m in Sources */,
 				71D99D301CEF02E700CA32DE /* CustomIOSAlertView.m in Sources */,
 				7162A5731C58728D00AB630E /* DetailTopicCell.m in Sources */,
@@ -2273,7 +2260,6 @@
 				7162A5601C58724700AB630E /* CustomerEditViewController.m in Sources */,
 				718B91831C75638100265FFF /* TouchImageView.m in Sources */,
 				7162A5DC1C5876E300AB630E /* LoginViewController.m in Sources */,
-				42BEF3561E89FE1200632AB6 /* README.md in Sources */,
 				4289805D1E249375005F1BD8 /* UIColor+JK_HEX.m in Sources */,
 				7162A5811C5872EF00AB630E /* HomeTableViewCellBanner.m in Sources */,
 				7162A5E61C58781000AB630E /* iSalesNavigationController.m in Sources */,
@@ -2297,8 +2283,6 @@
 				42D8CD591FC6620C005BEA15 /* CommonEditorTableContainerView.m in Sources */,
 				3C7C796E23F67BE3003F4342 /* RAYTPlayer.m in Sources */,
 				4289802C1E2492D2005F1BD8 /* CategoryPriceViewController.m in Sources */,
-				42BEF3511E89FE1200632AB6 /* CHANGELOG.md in Sources */,
-				42BEF35A1E89FE1200632AB6 /* README.md in Sources */,
 				71DF748D1C57608F00F2789C /* TouchLabel.m in Sources */,
 				428980171E24924D005F1BD8 /* SortItemViewController.m in Sources */,
 				42D3A4A11EFA6D36007A54C1 /* ContentPreviewController.m in Sources */,

+ 6 - 20
RedAnt ERP Mobile/iSales-UNITED WAVER.xcodeproj/project.pbxproj

@@ -61,18 +61,14 @@
 		42BEAB381FA1D23B0024D647 /* EnumSelectAndSortViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BEAB341FA1D23A0024D647 /* EnumSelectAndSortViewController.m */; };
 		42BEF34F1E89FE1100632AB6 /* FirebaseAnalytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF3241E89FE1100632AB6 /* FirebaseAnalytics.framework */; };
 		42BEF3501E89FE1100632AB6 /* FirebaseCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF3271E89FE1100632AB6 /* FirebaseCore.framework */; };
-		42BEF3511E89FE1200632AB6 /* CHANGELOG.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF3291E89FE1100632AB6 /* CHANGELOG.md */; };
 		42BEF3521E89FE1200632AB6 /* FirebaseInstanceID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF32B1E89FE1100632AB6 /* FirebaseInstanceID.framework */; };
-		42BEF3531E89FE1200632AB6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF32C1E89FE1100632AB6 /* README.md */; };
 		42BEF3541E89FE1200632AB6 /* GGLAnalytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF32F1E89FE1100632AB6 /* GGLAnalytics.framework */; };
 		42BEF3551E89FE1200632AB6 /* GGLCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF3301E89FE1100632AB6 /* GGLCore.framework */; };
-		42BEF3561E89FE1200632AB6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF3391E89FE1100632AB6 /* README.md */; };
 		42BEF3571E89FE1200632AB6 /* libGoogleAnalytics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF33C1E89FE1100632AB6 /* libGoogleAnalytics.a */; };
 		42BEF3581E89FE1200632AB6 /* GTMNSData+zlib.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF34B1E89FE1100632AB6 /* GTMNSData+zlib.m */; };
-		42BEF35A1E89FE1200632AB6 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF34E1E89FE1100632AB6 /* README.md */; };
 		42BEF35D1E89FECD00632AB6 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF35C1E89FECD00632AB6 /* SystemConfiguration.framework */; };
 		42BEF35F1E89FEE300632AB6 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF35E1E89FEE300632AB6 /* CoreData.framework */; };
-		42BEF3621E8A005800632AB6 /* GoogleAnalyst.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF3611E8A005800632AB6 /* GoogleAnalyst.m */; };
+		42BEF3621E8A005800632AB6 /* GoogleAnalyst.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BEF3611E8A005800632AB6 /* GoogleAnalyst.m */; settings = {COMPILER_FLAGS = "-w"; }; };
 		42BF67CC1E5179970081F90A /* ERPUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BF67CB1E5179970081F90A /* ERPUtils.m */; };
 		42C72F67212A55090054722D /* RAPortfolioInputDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 42C72F66212A55090054722D /* RAPortfolioInputDialog.m */; };
 		42D3A4A11EFA6D36007A54C1 /* ContentPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D3A49B1EFA6D36007A54C1 /* ContentPreviewController.m */; };
@@ -118,11 +114,11 @@
 		7141DD4E1C57459B00F7DF59 /* bitstream.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD3E1C57459B00F7DF59 /* bitstream.c */; };
 		7141DD4F1C57459B00F7DF59 /* mask.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD401C57459B00F7DF59 /* mask.c */; };
 		7141DD501C57459B00F7DF59 /* QRCodeGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD431C57459B00F7DF59 /* QRCodeGenerator.m */; };
-		7141DD511C57459B00F7DF59 /* qrencode.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD441C57459B00F7DF59 /* qrencode.c */; };
+		7141DD511C57459B00F7DF59 /* qrencode.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD441C57459B00F7DF59 /* qrencode.c */; settings = {COMPILER_FLAGS = "-Wno-shorten-64-to-32"; }; };
 		7141DD521C57459B00F7DF59 /* qrinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD461C57459B00F7DF59 /* qrinput.c */; };
 		7141DD531C57459B00F7DF59 /* qrspec.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD481C57459B00F7DF59 /* qrspec.c */; };
 		7141DD541C57459B00F7DF59 /* rscode.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD4A1C57459B00F7DF59 /* rscode.c */; };
-		7141DD551C57459B00F7DF59 /* split.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD4C1C57459B00F7DF59 /* split.c */; };
+		7141DD551C57459B00F7DF59 /* split.c in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD4C1C57459B00F7DF59 /* split.c */; settings = {COMPILER_FLAGS = "-Wno-shorten-64-to-32"; }; };
 		7141DD5F1C5747CE00F7DF59 /* AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD571C5747CE00F7DF59 /* AESCrypt.m */; };
 		7141DD611C5747CE00F7DF59 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD5A1C5747CE00F7DF59 /* NSData+Base64.m */; };
 		7141DD621C5747CE00F7DF59 /* NSData+CommonCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 7141DD5C1C5747CE00F7DF59 /* NSData+CommonCrypto.m */; };
@@ -248,7 +244,7 @@
 		71BBA2291CEAC17E00C91DED /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 71BBA2281CEAC17E00C91DED /* libz.tbd */; };
 		71BBA2401CEAEF0700C91DED /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 71BBA2381CEAEF0700C91DED /* ioapi.c */; };
 		71BBA2411CEAEF0700C91DED /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 71BBA23A1CEAEF0700C91DED /* mztools.c */; };
-		71BBA2421CEAEF0700C91DED /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 71BBA23C1CEAEF0700C91DED /* unzip.c */; };
+		71BBA2421CEAEF0700C91DED /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 71BBA23C1CEAEF0700C91DED /* unzip.c */; settings = {COMPILER_FLAGS = "-Wno-dangling-else"; }; };
 		71BBA2431CEAEF0700C91DED /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 71BBA23E1CEAEF0700C91DED /* zip.c */; };
 		71BF06FB1D2F3CAC00981938 /* OLDataProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BF06FA1D2F3CAC00981938 /* OLDataProvider.m */; };
 		71BF06FE1D2F3CBA00981938 /* OfflineSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BF06FD1D2F3CBA00981938 /* OfflineSettingViewController.m */; };
@@ -392,9 +388,7 @@
 		42BEAB341FA1D23A0024D647 /* EnumSelectAndSortViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumSelectAndSortViewController.m; sourceTree = "<group>"; };
 		42BEF3241E89FE1100632AB6 /* FirebaseAnalytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseAnalytics.framework; sourceTree = "<group>"; };
 		42BEF3271E89FE1100632AB6 /* FirebaseCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = "<group>"; };
-		42BEF3291E89FE1100632AB6 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
 		42BEF32B1E89FE1100632AB6 /* FirebaseInstanceID.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseInstanceID.framework; sourceTree = "<group>"; };
-		42BEF32C1E89FE1100632AB6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
 		42BEF32F1E89FE1100632AB6 /* GGLAnalytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GGLAnalytics.framework; sourceTree = "<group>"; };
 		42BEF3301E89FE1100632AB6 /* GGLCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GGLCore.framework; sourceTree = "<group>"; };
 		42BEF3321E89FE1100632AB6 /* Analytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Analytics.h; sourceTree = "<group>"; };
@@ -403,7 +397,6 @@
 		42BEF3361E89FE1100632AB6 /* Analytics-Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Analytics-Module.h"; sourceTree = "<group>"; };
 		42BEF3371E89FE1100632AB6 /* Core-Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Core-Module.h"; sourceTree = "<group>"; };
 		42BEF3381E89FE1100632AB6 /* SignIn-Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SignIn-Module.h"; sourceTree = "<group>"; };
-		42BEF3391E89FE1100632AB6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
 		42BEF33C1E89FE1100632AB6 /* libGoogleAnalytics.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGoogleAnalytics.a; sourceTree = "<group>"; };
 		42BEF33E1E89FE1100632AB6 /* GAI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GAI.h; sourceTree = "<group>"; };
 		42BEF33F1E89FE1100632AB6 /* GAIDictionaryBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GAIDictionaryBuilder.h; sourceTree = "<group>"; };
@@ -419,7 +412,6 @@
 		42BEF34B1E89FE1100632AB6 /* GTMNSData+zlib.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMNSData+zlib.m"; sourceTree = "<group>"; };
 		42BEF34C1E89FE1100632AB6 /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMDefines.h; sourceTree = "<group>"; };
 		42BEF34D1E89FE1100632AB6 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
-		42BEF34E1E89FE1100632AB6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
 		42BEF35C1E89FECD00632AB6 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
 		42BEF35E1E89FEE300632AB6 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
 		42BEF3601E8A005800632AB6 /* GoogleAnalyst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GoogleAnalyst.h; sourceTree = "<group>"; };
@@ -1030,9 +1022,7 @@
 		42BEF3281E89FE1100632AB6 /* FirebaseInstanceID */ = {
 			isa = PBXGroup;
 			children = (
-				42BEF3291E89FE1100632AB6 /* CHANGELOG.md */,
 				42BEF32A1E89FE1100632AB6 /* Frameworks */,
-				42BEF32C1E89FE1100632AB6 /* README.md */,
 			);
 			path = FirebaseInstanceID;
 			sourceTree = "<group>";
@@ -1050,7 +1040,6 @@
 			children = (
 				42BEF32E1E89FE1100632AB6 /* Frameworks */,
 				42BEF3311E89FE1100632AB6 /* Headers */,
-				42BEF3391E89FE1100632AB6 /* README.md */,
 			);
 			path = Google;
 			sourceTree = "<group>";
@@ -1126,7 +1115,6 @@
 				42BEF3491E89FE1100632AB6 /* Foundation */,
 				42BEF34C1E89FE1100632AB6 /* GTMDefines.h */,
 				42BEF34D1E89FE1100632AB6 /* LICENSE */,
-				42BEF34E1E89FE1100632AB6 /* README.md */,
 			);
 			path = GoogleToolboxForMac;
 			sourceTree = "<group>";
@@ -2211,7 +2199,6 @@
 				712AFEDF1DBA050200254965 /* TextDrawable.m in Sources */,
 				7162A5611C58724700AB630E /* CustomerInfoViewController.m in Sources */,
 				71DF74681C575E7900F2789C /* EnumSelectViewController.m in Sources */,
-				42BEF3531E89FE1200632AB6 /* README.md in Sources */,
 				428980471E249339005F1BD8 /* JKLockController.m in Sources */,
 				71D99D301CEF02E700CA32DE /* CustomIOSAlertView.m in Sources */,
 				7162A5731C58728D00AB630E /* DetailTopicCell.m in Sources */,
@@ -2280,7 +2267,6 @@
 				7162A5601C58724700AB630E /* CustomerEditViewController.m in Sources */,
 				718B91831C75638100265FFF /* TouchImageView.m in Sources */,
 				7162A5DC1C5876E300AB630E /* LoginViewController.m in Sources */,
-				42BEF3561E89FE1200632AB6 /* README.md in Sources */,
 				4289805D1E249375005F1BD8 /* UIColor+JK_HEX.m in Sources */,
 				7162A5811C5872EF00AB630E /* HomeTableViewCellBanner.m in Sources */,
 				7162A5E61C58781000AB630E /* iSalesNavigationController.m in Sources */,
@@ -2303,8 +2289,6 @@
 				428980041E2490C1005F1BD8 /* NotificationNameCenter.m in Sources */,
 				4289802C1E2492D2005F1BD8 /* CategoryPriceViewController.m in Sources */,
 				3CF55F9C238D20D3009D9414 /* RAYTPlayer.m in Sources */,
-				42BEF3511E89FE1200632AB6 /* CHANGELOG.md in Sources */,
-				42BEF35A1E89FE1200632AB6 /* README.md in Sources */,
 				71DF748D1C57608F00F2789C /* TouchLabel.m in Sources */,
 				428980171E24924D005F1BD8 /* SortItemViewController.m in Sources */,
 				42D3A4A11EFA6D36007A54C1 /* ContentPreviewController.m in Sources */,
@@ -2510,6 +2494,7 @@
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "iSales-UWAVER/iSales-UWAVER-Prefix.pch";
+				GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
 				INFOPLIST_FILE = "$(SRCROOT)/iSales-UWAVER/iSales-UWAVER-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LIBRARY_SEARCH_PATHS = (
@@ -2555,6 +2540,7 @@
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "iSales-UWAVER/iSales-UWAVER-Prefix.pch";
+				GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
 				INFOPLIST_FILE = "$(SRCROOT)/iSales-UWAVER/iSales-UWAVER-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LIBRARY_SEARCH_PATHS = (

+ 1 - 1
common/FileCache.m

@@ -42,7 +42,7 @@
     if(path.length==0)
         path=@"";
     
-    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     
 //    if(appDelegate.bEnable_Cache==false)
 //        return ;

+ 2 - 2
common/NetworkUtils.m

@@ -142,7 +142,7 @@ repeat:
         //http method
         [request setHTTPMethod:@"POST"];
         
-        NSLog([[NSString alloc] initWithData:myRequestData encoding:NSUTF8StringEncoding]);
+        NSLog(@"%@", [[NSString alloc] initWithData:myRequestData encoding:NSUTF8StringEncoding]);
         NSHTTPURLResponse* urlResponse = nil;
         
         NSError *error = nil;
@@ -705,7 +705,7 @@ repeat:
         [request setHTTPMethod:@"POST"];
         
         
-    NSLog([[NSString alloc] initWithData:myRequestData encoding:NSUTF8StringEncoding]);
+    NSLog(@"%@", [[NSString alloc] initWithData:myRequestData encoding:NSUTF8StringEncoding]);
          
          NSURLSession *urlSession = [self standSession];
          

+ 17 - 11
common/WK PDF+Web/RAPDFViewController.m

@@ -211,7 +211,7 @@
 -(void) loadcontent
 {
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Loading..."];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Loading..."];
     self.mum.hidden=false;
     
     if(self.isLocalfile)
@@ -225,7 +225,9 @@
         
         self.content= [NSData dataWithContentsOfFile:self.url];
         
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+        
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         
         if (self.filename.length <= 0) {
             self.filename=[self.url lastPathComponent];
@@ -281,7 +283,7 @@
         
         
         dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
             
             [[self navigationController] setNavigationBarHidden:self.hidenavi animated:NO];
             self.navigationItem.title = self.save_name;
@@ -379,7 +381,7 @@
 - (IBAction)onPrintClick:(id)sender {
     
     
-  //  UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"preparing print..."];
+  //  UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"preparing print..."];
     
     UIPrintInteractionController* airPrinterController=[UIPrintInteractionController sharedPrintController];
     UIPrintInfo *printInfo = [UIPrintInfo printInfo];
@@ -422,7 +424,7 @@
 //    
 //    [[UIPrinter printerWithURL:[NSURL URLWithString:appDelegate.printerURL]] contactPrinter:^(BOOL available)
 //     {
-//         [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//         [waitalert dismissViewControllerAnimated:YES completion:nil];
 //         
 //         if (available&& appDelegate.printerURL.length>0)
 //         {
@@ -760,7 +762,7 @@
 //{
 //
 //
-//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"preparing print..."];
+//    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"preparing print..."];
 //
 //    UIPrintInteractionController* airPrinterController=[UIPrintInteractionController sharedPrintController];
 //    UIPrintInfo *printInfo = [UIPrintInfo printInfo];
@@ -792,7 +794,7 @@
 //
 //    [[UIPrinter printerWithURL:[NSURL URLWithString:appDelegate.printerURL]] contactPrinter:^(BOOL available)
 //     {
-//         [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//         [waitalert dismissViewControllerAnimated:YES completion:nil];
 //
 //         if (available&& appDelegate.printerURL.length>0)
 //         {
@@ -884,7 +886,7 @@
 {
     
     
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"preparing print..."];
+    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"preparing print..."];
     
     UIPrintInteractionController* airPrinterController=[UIPrintInteractionController sharedPrintController];
     UIPrintInfo *printInfo = [UIPrintInfo printInfo];
@@ -915,7 +917,8 @@
     
     if(appDelegate.printerURL==nil)
     {
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+        [waitalert dismissViewControllerAnimated:YES completion:nil];
+//        [waitalert dismissViewControllerAnimated:YES completion:nil];
         if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1)
         {
             UIPrinterPickerController *printPicker = [UIPrinterPickerController printerPickerControllerWithInitiallySelectedPrinter:nil];
@@ -973,7 +976,10 @@
         UIPrinter *airPrinter = [UIPrinter printerWithURL:[NSURL URLWithString:appDelegate.printerURL] ];///*self.printer;*/
         [airPrinter contactPrinter:^(BOOL available)
          {
-             [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+            
+            [waitalert dismissViewControllerAnimated:YES completion:nil];
+            
+//             [waitalert dismissViewControllerAnimated:YES completion:nil];
              
              if (available&& appDelegate.printerURL.length>0)
              {
@@ -1090,7 +1096,7 @@
 
     }
     
-    UIPrintPaper * pp=[[UIPrintPaper alloc] init];
+  //  UIPrintPaper * pp=[[UIPrintPaper alloc] init];
     
 //    CGSize paperSize = CGSizeMake(612, 792);
     UIPrintPaper * p=[UIPrintPaper bestPaperForPageSize:paperSize withPapersFromArray:paperList];

+ 1 - 1
common/WK PDF+Web/WebViewController.m

@@ -107,7 +107,7 @@
     
     
     NSURL *url =[NSURL URLWithString:self.url];
-    DebugLog(self.url);
+    DebugLog(@"%@",self.url);
     NSURLRequest *request =[NSURLRequest requestWithURL:url];
     [self.wkWebview loadRequest:request];
     

+ 1 - 1
common/Youtube/RAYTPlayer.m

@@ -1297,7 +1297,7 @@
       NSLog(@"%s",__func__);
         NSLog(@"navigationAction = %@, \r!!!!!!!!!!!!!!!!!!!!!!\n request = %@",navigationAction,navigationAction.request.URL);
 
-        NSURLRequest * request = navigationAction.request;
+    //    NSURLRequest * request = navigationAction.request;
 
 
 return decisionHandler(WKNavigationActionPolicyAllow);