AWS的IOS SDK DynamoDB扫描 - MainThread在emulador作品,但不要在设备调试 [英] AWS IOS SDK DynamoDB Scan - MainThread works in emulador, but don't in device debugger

查看:267
本文介绍了AWS的IOS SDK DynamoDB扫描 - MainThread在emulador作品,但不要在设备调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用我使用DynamoDB扫描,在所有emulador的iOS版本,以x code然而,工作正常,当我调试的设备(iPhone 5℃),主线程不工作。

In my app I use DynamoDB scan that works fine in all emulador iOS versions in xCode, however, when I debug in device (iPhone 5c), the main thread don't works.

[[[dynamoDBObjectMapper scan:[DDBTableRow class]
                  expression:scanExpression]
      continueWithExecutor:[BFExecutor mainThreadExecutor] withSuccessBlock:^id(BFTask *task) {
//Main Thread execution          
.
.
.
return nil;
  }] continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:^id(BFTask *task) {
      if (task.error) {
          NSLog(@"refreshList Error");
      }
      return nil;
  }];

你知道吗?

推荐答案

要开始我加了一个异常断点跟踪。这引起了code停在发生错误的位置。仅供参考;后藤X code->查看 - > Navigators->显示断点​​导航。在左侧窗格中点击+,然后选择添加例外断点。运行该应用程序。

To start the tracker I added a exception breakpoint. This caused the code to stop at the point where the error occurs. fyi; Goto xcode->View->Navigators->Show Breakpoint Navigator. In the left pane click on "+" and select "Add exception breakpoint". Run the application.

该例外AWSDynamoDBObjectMapper发生 - removeAttributes方法。当此方法试图设置对象为mutableItem一个讯息话题*** setObjectForKey:对象不能是零推出,什么时候试图以处理返回的对象双(数字)项目。 奇怪的是只有在我的设备,而不是在X code所有模拟器......所以,我更新了我的POD(AWSiOSSDKv2 2.0.17(是2.0.13)),而这个问题奇迹般地解决了......

The exception occured in AWSDynamoDBObjectMapper - removeAttributes method. When this method tried to set object into mutableItem a messsage "*** setObjectForKey: object cannot be nil " was launched, exactly when tried to handle a double(number) item in the return object. Oddly only in my device, not in all emulators in Xcode... So I updated my pod (AWSiOSSDKv2 2.0.17 (was 2.0.13)) and this problem was magically solved...

这篇关于AWS的IOS SDK DynamoDB扫描 - MainThread在emulador作品,但不要在设备调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆