Forráskód Böngészése

Apex CRM 支持推送消息

Ray Zhang 7 éve
szülő
commit
39efd827c9
21 módosított fájl, 635 hozzáadás és 82 törlés
  1. BIN
      Apex Mobile/Apex Mobile.xcodeproj/project.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate
  2. 186 10
      Apex Mobile/Apex Mobile.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. BIN
      RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
  4. BIN
      RedAnt CRM/APEX CRM/APEX CRM.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
  5. 1 0
      RedAnt CRM/APEX CRM/APEX CRM/AppDelegate.h
  6. 33 17
      RedAnt CRM/APEX CRM/APEX CRM/AppDelegate.m
  7. 7 3
      RedAnt CRM/APEX CRM/APEX CRM/DataProvider/RADataProvider.m
  8. 13 7
      RedAnt CRM/APEX CRM/APEX CRM/RAWKWebView.m
  9. 1 1
      RedAnt CRM/APEX CRM/APEX CRM/User/CRMUser.m
  10. 1 7
      RedAnt CRM/APEX CRM/APEX CRM/ViewController.m
  11. 1 1
      RedAnt CRM/APEX CRM/APEX CRM/WKWebTestViewController.h
  12. 30 16
      RedAnt CRM/APEX CRM/APEX CRM/WKWebTestViewController.m
  13. 6 0
      RedAnt CRM/APEX CRM/APEX CRM/config/config.h
  14. 1 1
      RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  15. 2 2
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m
  16. 1 1
      RedAnt ERP Mobile/iSales-NPD/config.h
  17. 1 1
      Redant Drivers/Apex And Drivers/Info.plist
  18. BIN
      Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
  19. 347 12
      Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  20. 2 2
      common/Camera/RACameraViewController.m
  21. 2 1
      common/Network/RAReachability.m

BIN
Apex Mobile/Apex Mobile.xcodeproj/project.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 186 - 10
Apex Mobile/Apex Mobile.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -287,8 +287,8 @@
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "573"
             endingLineNumber = "573"
-            landmarkName = "HomeViewController"
-            landmarkType = "3">
+            landmarkName = "-modeSegmentClick:"
+            landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -575,7 +575,7 @@
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "349"
             endingLineNumber = "349"
-            landmarkName = "-loadData"
+            landmarkName = "-uploadCache"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -591,8 +591,8 @@
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "853"
             endingLineNumber = "853"
-            landmarkName = "HomeViewController"
-            landmarkType = "3">
+            landmarkName = "-scrollViewDidEndDecelerating:"
+            landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -698,7 +698,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/RANetwork.m"
-            timestampString = "562296176.988677"
+            timestampString = "571823111.2033809"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "433"
@@ -714,7 +714,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/RANetwork.m"
-            timestampString = "562296176.989357"
+            timestampString = "571823111.219533"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "432"
@@ -921,12 +921,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/RANetwork.m"
-            timestampString = "562296176.9917639"
+            timestampString = "571823111.220026"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "929"
             endingLineNumber = "929"
-            landmarkName = "+UpdateServiceLocation"
+            landmarkName = "+pull_message:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -937,7 +937,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/RANetwork.m"
-            timestampString = "562296176.992326"
+            timestampString = "571823111.2203389"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "949"
@@ -978,5 +978,181 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/RANetwork.m"
+            timestampString = "571823111.22065"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "207"
+            endingLineNumber = "207"
+            landmarkName = "+parse_authinfo:user:password:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/RANetwork.m"
+            timestampString = "571823111.220916"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "291"
+            endingLineNumber = "291"
+            landmarkName = "+parse_authinfo:user:password:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/RANetwork.m"
+            timestampString = "571823111.221158"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1265"
+            endingLineNumber = "1265"
+            landmarkName = "RANetwork"
+            landmarkType = "3">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/RANetwork.m"
+            timestampString = "571823111.2214611"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "23"
+            endingLineNumber = "23"
+            landmarkName = "+get_json:parameters:file:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/RANetwork.m"
+            timestampString = "571823111.2217259"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1566"
+            endingLineNumber = "1566"
+            landmarkName = "+mockResult:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/Result/Presenter/ApexResultPresenter.m"
+            timestampString = "569755604.571944"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "73"
+            endingLineNumber = "73"
+            landmarkName = "-loadDataSuccessWithTitle:itemsArray:itemCount:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/Result/ApexResultViewController.m"
+            timestampString = "569754800.7547539"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "163"
+            endingLineNumber = "163"
+            landmarkName = "-onDownloadFile:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/Result/TableDelegate/ApexResultViewController+TableDelegate.m"
+            timestampString = "569755604.572127"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "43"
+            endingLineNumber = "43"
+            landmarkName = "-handleRowAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/Result/Presenter/ApexResultPresenter.m"
+            timestampString = "569755604.573859"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "163"
+            endingLineNumber = "163"
+            landmarkName = "-loadData:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/Result/TableDelegate/ApexResultViewController+TableDelegate.m"
+            timestampString = "569755604.573933"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "50"
+            endingLineNumber = "50"
+            landmarkName = "-handleRowAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/Result/TableDelegate/ApexResultViewController+TableDelegate.m"
+            timestampString = "569755604.5742919"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "31"
+            endingLineNumber = "31"
+            landmarkName = "-paramsForIndexPath:withAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

BIN
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


BIN
RedAnt CRM/APEX CRM/APEX CRM.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 1 - 0
RedAnt CRM/APEX CRM/APEX CRM/AppDelegate.h

@@ -13,5 +13,6 @@
 @property (strong, nonatomic) UIWindow *window;
 
 @property (strong, nonatomic) NSString *apnToken;
+@property (strong, nonatomic) NSMutableDictionary *launchNotification;
 @end
 

+ 33 - 17
RedAnt CRM/APEX CRM/APEX CRM/AppDelegate.m

@@ -39,8 +39,14 @@
     
     // 用户点击通知启动应用
     if (launchOptions && application.applicationState == UIApplicationStateInactive) {
-        NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
+        NSMutableDictionary *userInfo = [[launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey] mutableCopy];
         if (userInfo) {
+            
+//            userInfo[@"aps"][@"launch_app"]=@(true);
+            userInfo[@"launch_app"]=@(true);
+                NSLog(@"didFinishLaunchingWithOptions launch from notification");
+            
+            self.launchNotification = userInfo;
             [self receiveNotification:userInfo];
         }
     }
@@ -68,7 +74,7 @@
 - (void)applicationDidBecomeActive:(UIApplication *)application {
     // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
     
-    [application setApplicationIconBadgeNumber:0];
+//    [application setApplicationIconBadgeNumber:0];
 }
 
 
@@ -106,7 +112,10 @@
     // 用户点击
     if ([response.actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier]) {
         
-        NSDictionary *userInfo = response.notification.request.content.userInfo;
+        NSLog(@"didReceiveNotificationResponse");
+        NSMutableDictionary *userInfo = [response.notification.request.content.userInfo mutableCopy];
+        userInfo[@"foreground"]=@(false);
+//        userInfo[@"aps"][@"foreground"]=@(true);
         [self receiveNotification:userInfo];
     }
 }
@@ -114,7 +123,10 @@
 // 前台接收通知
 - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
     
-    NSDictionary *userInfo = notification.request.content.userInfo;
+    NSLog(@"willPresentNotification");
+    
+    NSMutableDictionary *userInfo = [notification.request.content.userInfo mutableCopy];
+    userInfo[@"foreground"]=@(true);
     [self showDialogForNotification:userInfo];
     
     if (completionHandler) {
@@ -156,23 +168,27 @@ content-available = 1
 #pragma mark - Handle Notification
 
 - (void)showDialogForNotification:(NSDictionary *)userInfo {
+
+    [self receiveNotification:userInfo];
     
-    __weak typeof(self) weakSelf = self;
-    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"you have a message, read it now?" preferredStyle:UIAlertControllerStyleAlert];
-    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-        [weakSelf receiveNotification:userInfo];
-    }];
-    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-        
-    }];
-    
-    [alertVC addAction:cancelAction];
-    [alertVC addAction:okAction];
-    
-    [self.window.rootViewController presentViewController:alertVC animated:YES completion:nil];
+//    __weak typeof(self) weakSelf = self;
+//    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Message" message:@"you have a message, read it now?" preferredStyle:UIAlertControllerStyleAlert];
+//    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+//        [weakSelf receiveNotification:userInfo];
+//    }];
+//    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+//
+//    }];
+//
+//    [alertVC addAction:cancelAction];
+//    [alertVC addAction:okAction];
+//
+//    [self.window.rootViewController presentViewController:alertVC animated:YES completion:nil];
 }
 
 - (void)receiveNotification:(NSDictionary *)userInfo {
+    int badge=[userInfo[@"aps"][@"badge"] intValue]-1;
+    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:badge];
     [[NSNotificationCenter defaultCenter] postNotificationName:CRM_REMOTE_NOTIFICATION_RECEVIED object:self userInfo:userInfo];
 }
 

+ 7 - 3
RedAnt CRM/APEX CRM/APEX CRM/DataProvider/RADataProvider.m

@@ -9,8 +9,9 @@
 #import "RADataProvider.h"
 #import "RAUtils.h"
 #import "CRMUser.h"
+#import "config.h"
 
-static NSString * const URL_UPLOAD_TOKEN = @"";
+//static NSString * const URL_UPLOAD_TOKEN = @"";
 
 @implementation RADataProvider
 
@@ -181,10 +182,13 @@ static NSString * const URL_UPLOAD_TOKEN = @"";
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
        
         NSMutableDictionary *params = [@{
-                                         @"token": CRMUser.sharedUser.deviceToken
+                                         @"name":CRMUser.sharedUser.user,
+                                         @"password":CRMUser.sharedUser.password,
+                                         @"token": CRMUser.sharedUser.deviceToken,
+                                         @"platform": @"iOS",
                                          } mutableCopy];
     
-        [self get_json:URL_UPLOAD_TOKEN parameters:params file:nil];
+        [self get_json:URL_UPDATE_TOKEN parameters:params file:nil];
     });
 }
 

+ 13 - 7
RedAnt CRM/APEX CRM/APEX CRM/RAWKWebView.m

@@ -121,6 +121,8 @@
     [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"Preview"];
     [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"Navigation"];
     [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"DatetimePicker"];
+    
+//    [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"UpdateBadge"];
 
     [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"Signature"];
     [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"SelectContact"];
@@ -129,6 +131,7 @@
     
     [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"login"];
     [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"logout"];
+    [self.wkwebView.configuration.userContentController addScriptMessageHandler:self name:@"UpdateBadge"];
     
     //    [self.configuration.userContentController addScriptMessageHandler:self name:@"Color"];
     //    [self.configuration.userContentController addScriptMessageHandler:self name:@"Pay"];
@@ -156,6 +159,8 @@
     
     [self.wkwebView.configuration.userContentController removeScriptMessageHandlerForName:@"login"];
     [self.wkwebView.configuration.userContentController removeScriptMessageHandlerForName:@"logout"];
+    [self.wkwebView.configuration.userContentController removeScriptMessageHandlerForName:@"UpdateBadge"];
+    
 }
 - (void)dealloc
 {
@@ -332,12 +337,7 @@
 
 - (void)ra_share:(NSDictionary *)params {
     
-    /**
-     content = "\U6d4b\U8bd5\U5206\U4eab\U7684\U5185\U5bb9";
-     image = "http://192.168.0.138:8080/backend_test/1.png";
-     title = "\U6d4b\U8bd5\U5206\U4eab\U7684\U6807\U9898";
-     url = "http://192.168.0.138:8080/backend_test/index.html";
-     */
+
     
     // 设置分享内容
     
@@ -874,6 +874,9 @@
     } else if ([message.name isEqualToString:@"requestApplicationInfo"]) {
         
         [self handleRequestApplicationInfo: params];
+    } else if ([message.name isEqualToString:@"UpdateBadge"]) {
+        
+        [self handleUpdateBadge: params];
     } else if ([message.name isEqualToString:@"cleanCache"]) {
         
         [self handleCleanCache:params];
@@ -999,7 +1002,10 @@
     
     [self ra_selectContact:params];
 }
-
+- (void)handleUpdateBadge:(NSDictionary *)params {
+    [UIApplication sharedApplication].applicationIconBadgeNumber = [params[@"count"] intValue];
+//    [self ra_requestAppInfo:params];
+}
 - (void)handleRequestApplicationInfo:(NSDictionary *)params {
     [self ra_requestAppInfo:params];
 }

+ 1 - 1
RedAnt CRM/APEX CRM/APEX CRM/User/CRMUser.m

@@ -44,7 +44,7 @@ static NSString *const SecretKey = @"usai";
 }
 
 - (void)setPassword:(NSString *)password {
-    _password = [_password copy];
+    _password = [password copy];
 }
 
 - (BOOL)isLogin {

+ 1 - 7
RedAnt CRM/APEX CRM/APEX CRM/ViewController.m

@@ -51,11 +51,7 @@
     
     WKWebTestViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"WKWebTestViewController"];
 
-//    vc.url=@"http://192.168.0.138:8080/backend_test/index.html";
-    
-    
 
-//    vc.url = @"http://192.168.0.124:8081/j/crm/mobile/login";
     
     vc.url = @"http://192.168.1.150:8080/MyWeb/html/test.html";
     
@@ -93,9 +89,7 @@
             //http://dev.dcloud.net.cn/mui/
             break;
     }
-//    vc.url = @"http://192.168.0.124:8081/j/crm/mobile/login";
-//    vc.url = @"http://192.168.0.130:8080/MyWeb/html/test.html";
-//    vc.url = @"http://192.168.0.124:8081/j/crm/mobile/login";
+
     [self.navigationController pushViewController:vc animated:YES];
     
     

+ 1 - 1
RedAnt CRM/APEX CRM/APEX CRM/WKWebTestViewController.h

@@ -12,6 +12,6 @@
 
 @property (strong, nonatomic) NSString *url;
 
-- (void)readNotificationNow:(NSInteger)notificationId;
+- (void)readNotificationNow:(NSString*)notificationstr;
 
 @end

+ 30 - 16
RedAnt CRM/APEX CRM/APEX CRM/WKWebTestViewController.m

@@ -12,12 +12,13 @@
 #import "RADataProvider.h"
 #import "NSString+RAJavascript.h"
 #import "CRMRemoteNotificationBroadcast.h"
-
+#import "config.h"
+#import "AppDelegate.h"
 @interface WKWebTestViewController () <RAWebViewDelegate>
 
 @property (weak, nonatomic) IBOutlet RAWKWebView *webview;
 @property (nonatomic,assign) BOOL loaded;
-@property (nonatomic,assign) NSInteger notificationId;
+@property (nonatomic,strong) NSString* notificationstr;
 
 @end
 
@@ -26,6 +27,9 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
+    
+    
+    
     self.navigationController.navigationBar.hidden =true;
     
     [UIApplication sharedApplication].keyWindow.backgroundColor = [UIColor whiteColor];
@@ -37,7 +41,7 @@
     }
     
     if (!_url) {
-        _url = @"https://ra.apexshipping.com/apexcrm/crm/mobile/login";
+        _url = URL_LOGIN;
     }
     
     self.webview.delegate = self;
@@ -48,7 +52,10 @@
         [self.navigationController pushViewController:vc animated:YES];
     };
 
-    self.notificationId = -1;
+    AppDelegate *delagate =(AppDelegate *) [[UIApplication sharedApplication]delegate];
+    NSMutableDictionary* aps =[delagate.launchNotification[@"aps"] mutableCopy];
+    aps[@"launch_app"] =delagate.launchNotification[@"launch_app"];
+    self.notificationstr = [RAConvertor dict2string:aps];
     [self regirsterBroadcast];
 }
 
@@ -87,22 +94,25 @@
     @synchronized (self) {
         self.loaded = !error;
         if (self.loaded) {
-            [self readNotificationNow:self.notificationId];
+            [self readNotificationNow:self.notificationstr];
         }
     }
 }
 
 #pragma mark - Notification
 
-- (void)handleNotificationByJs:(NSInteger)notificationId {
+- (void)handleNotificationByJs:(NSString*)notificationstr {
     
+    
+    if(notificationstr.length==0)
+        return;
     NSString *user = CRMUser.sharedUser.user;
     NSString *password = CRMUser.sharedUser.password;
     
     user = [user ra_stringByEscapingForJavascriptWithDelimiter:'\'' wrapWithDelimiters:YES];
     password = [password ra_stringByEscapingForJavascriptWithDelimiter:'\'' wrapWithDelimiters:YES];
     
-    NSString *jsFunction = [NSString stringWithFormat:@"showPageForNotification(%@, %@, %ld)", user, password, (long)notificationId];
+    NSString *jsFunction = [NSString stringWithFormat:@"showPageForNotification(%@, %@, %@)", user, password, notificationstr];
     [self.webview evaluateJs:jsFunction completionHandler:^(id result, NSError *error) {
        
         NSLog(@"handleNotificationByJs: Result: %@ Error: %@", result, error.localizedDescription);
@@ -110,11 +120,13 @@
 }
 
 // 当前ViewController是WebVC
-- (void)readNotificationNow:(NSInteger)notificationId {
-    if (notificationId == -1) {
+- (void)readNotificationNow:(NSString*)notificationstr {
+    if(notificationstr.length==0)
         return;
-    }
-    self.notificationId = -1;
+//    if (notificationId == -1) {
+//        return;
+//    }
+//    self.notificationId = -1;
     
     if (!CRMUser.sharedUser.isLogin) {
         
@@ -129,7 +141,7 @@
         return;
     }
     
-    [self handleNotificationByJs:notificationId];
+    [self handleNotificationByJs:notificationstr];
 }
 
 - (void)receiveBroadCast:(NSNotification *)notification {
@@ -142,17 +154,19 @@
         [self.navigationController popToViewController:self animated:YES];
     }
     
-    NSDictionary *aps = [notification.userInfo objectForKey:@"aps"];
-    NSInteger notificationId = [[aps objectForKey:@"id"] integerValue];
+    NSMutableDictionary *aps = [[notification.userInfo objectForKey:@"aps"] mutableCopy];
+    aps[@"foreground"]= notification.userInfo[@"foreground"];
+    NSString* notificationstr = [RAConvertor dict2string:aps];
+//    NSInteger notificationId = [[aps objectForKey:@"id"] integerValue];
     
     @synchronized (self) {
         if (self.loaded) {
             
-            [self readNotificationNow:notificationId];
+            [self readNotificationNow:notificationstr];
             
         } else {
             
-            self.notificationId = notificationId;
+            self.notificationstr = notificationstr;
         }
     }
 }

+ 6 - 0
RedAnt CRM/APEX CRM/APEX CRM/config/config.h

@@ -8,6 +8,12 @@
 
 #ifndef config_h
 #define config_h
+//#define URL_SERVER @"https://ra.apexshipping.com"
+//#define URL_LOGIN @"https://ra.apexshipping.com/apexcrm/crm/mobile/login";
+//#define URL_LOGIN @"https://ra.apexshipping.com/apexcrm/crm/mobile/token.mo/";
 
+#define URL_SERVER @"http://192.168.1.108:8081"
+#define URL_LOGIN @"http://192.168.1.108:8081/j/crm/mobile/login";
+#define URL_UPDATE_TOKEN @"http://192.168.1.108:8081/j/crm/mobile/token.mo/"
 
 #endif /* config_h */

+ 1 - 1
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1562,7 +1562,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/CommonEditor/CommonEditorViewController.m"
-            timestampString = "567565061.50914"
+            timestampString = "573031368.6110981"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "3844"

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

@@ -3790,7 +3790,7 @@
             cell.labelTitle.text=title;
             
             int disabble = [[item_json objectForKey:@"disable"] intValue];
-            if (disabble || readonly) {
+            if (disabble==1 || readonly) {
                 cell.switchCtrl.enabled = NO;
             } else {
                 cell.switchCtrl.enabled = YES;
@@ -4254,7 +4254,7 @@
             //            }
             
             int disabble = [[item_json objectForKey:@"disable"] intValue];
-            if (disabble || readonly) {
+            if (disabble==1 || readonly) {
                 cell.imageviewSignature.userInteractionEnabled = NO;
             } else {
                 cell.imageviewSignature.userInteractionEnabled = YES;

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/config.h

@@ -12,7 +12,7 @@
 #define BACKORDER_PROCESS // 允许backorder process
 
 # ifdef DEBUG
-//#define test_server
+#define test_server
 # endif
 
 #define exception_switch 1

+ 1 - 1
Redant Drivers/Apex And Drivers/Info.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>1.11</string>
 	<key>CFBundleVersion</key>
-	<string>40259</string>
+	<string>40284</string>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>comgooglemaps</string>

BIN
Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 347 - 12
Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -324,7 +324,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
-            timestampString = "560833279.49547"
+            timestampString = "572583324.40264"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "43"
@@ -436,7 +436,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/RADataProvider.m"
-            timestampString = "572497027.256822"
+            timestampString = "572520483.429287"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "199"
@@ -452,7 +452,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/RADataProvider.m"
-            timestampString = "572497027.257581"
+            timestampString = "572520483.4296809"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "302"
@@ -500,11 +500,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572497027.258036"
+            timestampString = "572583324.402934"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "447"
-            endingLineNumber = "447"
+            startingLineNumber = "510"
+            endingLineNumber = "510"
             landmarkName = "-loadData"
             landmarkType = "7">
          </BreakpointContent>
@@ -516,7 +516,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Update/RAOrderEditViewController.m"
-            timestampString = "572497027.25815"
+            timestampString = "573362621.847615"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "494"
@@ -532,12 +532,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/AppDelegate.m"
-            timestampString = "572497027.2582459"
+            timestampString = "572520483.4308701"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "510"
             endingLineNumber = "510"
-            landmarkName = "-locationManager:didFailWithError:"
+            landmarkName = "-locationManager:didChangeAuthorizationStatus:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -548,7 +548,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/More/RAHomeMoreViewController.m"
-            timestampString = "572497027.258351"
+            timestampString = "572520483.431087"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "310"
@@ -564,7 +564,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/More/RAHomeMoreViewController.m"
-            timestampString = "572497027.258467"
+            timestampString = "572520483.431302"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "293"
@@ -580,7 +580,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/More/RAHomeMoreViewController.m"
-            timestampString = "572497027.2586139"
+            timestampString = "572520483.431358"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "299"
@@ -589,5 +589,340 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.4035341"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "675"
+            endingLineNumber = "675"
+            landmarkName = "-signoutClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
+            timestampString = "572583324.403964"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "118"
+            endingLineNumber = "118"
+            landmarkName = "-signoutBtnClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
+            timestampString = "572583324.404022"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "124"
+            endingLineNumber = "124"
+            landmarkName = "-settingBtnClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
+            timestampString = "572583324.404084"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "130"
+            endingLineNumber = "130"
+            landmarkName = "-availableBtnClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
+            timestampString = "572583324.404145"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "136"
+            endingLineNumber = "136"
+            landmarkName = "-messageBtnClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.404197"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "491"
+            endingLineNumber = "491"
+            landmarkName = "-loadData"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/UIScrollVIew+Empty/UIScrollView+Empty.m"
+            timestampString = "572581856.15298"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "62"
+            endingLineNumber = "62"
+            landmarkName = "-showEmpty"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/UIScrollVIew+Empty/UIScrollView+Empty.m"
+            timestampString = "572581856.1530319"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "72"
+            endingLineNumber = "72"
+            landmarkName = "-hideEmpty"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/UIScrollVIew+Empty/UIScrollView+Empty.m"
+            timestampString = "572581856.1530761"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "54"
+            endingLineNumber = "54"
+            landmarkName = "-setEmptyView:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.404632"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "179"
+            endingLineNumber = "179"
+            landmarkName = "-configureTable"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.405009"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "125"
+            endingLineNumber = "125"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.405408"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "474"
+            endingLineNumber = "474"
+            landmarkName = "-loadData"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.405768"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "152"
+            endingLineNumber = "152"
+            landmarkName = "-configureTable"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/UIScrollVIew+Empty/UIScrollView+Empty.m"
+            timestampString = "572581856.1547689"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "39"
+            endingLineNumber = "39"
+            landmarkName = "-emptyContentView"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.406143"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "215"
+            endingLineNumber = "215"
+            landmarkName = "-configureTable"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/Home/RAHomeViewController.m"
+            timestampString = "572583324.406553"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "192"
+            endingLineNumber = "192"
+            landmarkName = "-configureTable"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[RAHomeViewController configureTable]"
+                  moduleName = "Apex And Drivers"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/Redant%20Drivers/Apex%20And%20Drivers/Home/RAHomeViewController.m"
+                  timestampString = "572582297.4171489"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "192"
+                  endingLineNumber = "192"
+                  offsetFromSymbolStart = "896">
+               </Location>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__38-[RAHomeViewController configureTable]_block_invoke"
+                  moduleName = "Apex And Drivers"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/Redant%20Drivers/Apex%20And%20Drivers/Home/RAHomeViewController.m"
+                  timestampString = "572582297.419011"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "193"
+                  endingLineNumber = "193"
+                  offsetFromSymbolStart = "48">
+               </Location>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__destroy_helper_block_.194"
+                  moduleName = "Apex And Drivers"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/ray/Documents/CODE_ERPSuiteIOS/Redant%20Drivers/Apex%20And%20Drivers/Home/RAHomeViewController.m"
+                  timestampString = "572582297.420758"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "192"
+                  endingLineNumber = "192"
+                  offsetFromSymbolStart = "16">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/EmptyView/RAEmptyView.m"
+            timestampString = "572582646.699594"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "21"
+            endingLineNumber = "21"
+            landmarkName = "+emptyViewWithTapBlk:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/AppDelegate.m"
+            timestampString = "573535839.840439"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "332"
+            endingLineNumber = "332"
+            landmarkName = "-application:didReceiveRemoteNotification:fetchCompletionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 2 - 2
common/Camera/RACameraViewController.m

@@ -374,7 +374,7 @@
     if (!self.cameraInitial) {
         return;
     }
-    
+    sender.enabled = false;
     AVCaptureConnection *connection = [self.captureOutput connectionWithMediaType:AVMediaTypeVideo];
     __weak typeof(self) weakSelf = self;
     [self.captureOutput captureStillImageAsynchronouslyFromConnection:connection completionHandler:^(CMSampleBufferRef  _Nullable imageDataSampleBuffer, NSError * _Nullable error) {
@@ -402,7 +402,7 @@
         } else {
             NSLog(@"take picture failed: %@",error);
         }
-        
+        sender.enabled = true;
     }];
 }
 

+ 2 - 1
common/Network/RAReachability.m

@@ -8,8 +8,9 @@
 
 #import "RAReachability.h"
 #import "Reachability.h"
+#import "config.h"
 
-#define host @"https://ra.apexshipping.com"
+#define host URL_SERVER
 
 @interface RAReachability ()