SIGSEV on [S3Request configureURLRequest:] on Amazon AWS iOS SDK - ios

I have an intermittent crash bug when posting images to an S3 bucket using the iOS SDK.
These crash bugs are formed of 2 errors, but originate in the same area of the SDK.
SEGSEV
0 ofs staff 0x00282616 testflight_backtrace + 382
1 ofs staff 0x00283264 TFSignalHandler + 264
2 libsystem_c.dylib 0x3b656e92 _sigtramp + 42
3 ofs staff 0x001c74a6 -S3Request configureURLRequest (S3Request.m:41)
4 ofs staff 0x001b3c1a -S3AbstractPutRequest configureURLRequest (S3AbstractPutRequest.m:27)
5 ofs staff 0x001c61ee -S3PutObjectRequest configureURLRequest (S3PutObjectRequest.m:62)
6 ofs staff 0x001b2bfe -AmazonS3Client signS3Request: (AmazonS3Client.m:579)
7 ofs staff 0x001b22aa -AmazonS3Client invoke: (AmazonS3Client.m:450)
8 ofs staff 0x001b1298 -AmazonS3Client putObject: (AmazonS3Client.m:134)
9 ofs staff 0x000d511e -OFSAmazonS3Client putObject: (OFSAmazonS3Client.m:41)
10 ofs staff 0x00099b02 -OFSAWSFileUploader upload:forTask:toAWSBucket:accessKey:secret:error: (OFSAWSFileUploader.m:120)
11 ofs staff 0x000d442c -OFSPhotoActivityUploadCell startUpload (OFSPhotoActivityUploadCell.m:104)
12 UIKit 0x354260c4 -UIApplication sendAction:to:from:forEvent: + 72
13 UIKit 0x35426076 -UIApplication sendAction:toTarget:fromSender:forEvent: + 30
14 UIKit 0x35426054 -UIControl sendAction:to:forEvent: + 44
15 UIKit 0x3542590a -UIControl(Internal) _sendActionsForEvents:withEvent: + 502
16 UIKit 0x35425e00 -UIControl touchesEnded:withEvent: + 488
17 UIKit 0x35344420 _UIGestureRecognizerUpdate + 5768
18 CoreFoundation 0x335086cc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
19 CoreFoundation 0x335069c0 __CFRunLoopDoObservers + 276
20 CoreFoundation 0x33506d16 __CFRunLoopRun + 742
21 CoreFoundation 0x33479ebc CFRunLoopRunSpecific + 356
22 CoreFoundation 0x33479d48 CFRunLoopRunInMode + 104
23 GraphicsServices 0x3703d2ea GSEventRunModal + 74
24 UIKit 0x3538f300 UIApplicationMain + 1120
25 ofs staff 0x00082e36 main (main.m:16)
26 libdyld.dylib 0x3b60fb1f start + 3
-__NSCFNumber requestFormat: unrecognized selector sent to instance 0x1d43cfc0
0 CoreFoundation 0x335332a3 __exceptionPreprocess + 163
1 libobjc.A.dylib 0x3b1d897f objc_exception_throw + 31
2 CoreFoundation 0x33536e07 -NSObject(NSObject) doesNotRecognizeSelector: + 171
3 CoreFoundation 0x33535531 ___forwarding___ + 393
4 CoreFoundation 0x3348cf68 _CF_forwarding_prep_0 + 24
5 ofs staff 0x001f84a7 -S3Request configureURLRequest (S3Request.m:41)
6 ofs staff 0x001e4c1b -S3AbstractPutRequest configureURLRequest (S3AbstractPutRequest.m:29)
7 ofs staff 0x001f71ef -S3PutObjectRequest configureURLRequest (S3PutObjectRequest.m:64)
8 ofs staff 0x001e3bff -AmazonS3Client signS3Request: (AmazonS3Client.m:579)
9 ofs staff 0x001e32ab -AmazonS3Client invoke: (AmazonS3Client.m:450)
10 ofs staff 0x001e2299 -AmazonS3Client putObject: (AmazonS3Client.m:134)
11 ofs staff 0x0010611f -OFSAmazonS3Client putObject: (OFSAmazonS3Client.m:41)
12 ofs staff 0x000cab03 -OFSAWSFileUploader upload:forTask:toAWSBucket:accessKey:secret:error: (OFSAWSFileUploader.m:120)
13 ofs staff 0x0010542d -OFSPhotoActivityUploadCell startUpload (OFSPhotoActivityUploadCell.m:104)
14 UIKit 0x354260c5 -UIApplication sendAction:to:from:forEvent: + 73
15 UIKit 0x35426077 -UIApplication sendAction:toTarget:fromSender:forEvent: + 31
16 UIKit 0x35426055 -UIControl sendAction:to:forEvent: + 45
17 UIKit 0x3542590b -UIControl(Internal) _sendActionsForEvents:withEvent: + 503
18 UIKit 0x35425e01 -UIControl touchesEnded:withEvent: + 489
19 UIKit 0x35344421 _UIGestureRecognizerUpdate + 5769
20 CoreFoundation 0x335086cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
21 CoreFoundation 0x335069c1 __CFRunLoopDoObservers + 277
22 CoreFoundation 0x33506d17 __CFRunLoopRun + 743
23 CoreFoundation 0x33479ebd CFRunLoopRunSpecific + 357
24 CoreFoundation 0x33479d49 CFRunLoopRunInMode + 105
25 GraphicsServices 0x3703d2eb GSEventRunModal + 75
26 UIKit 0x3538f301 UIApplicationMain + 1121
27 ofs staff 0x000b3e37 main (main.m:16)
28 libdyld.dylib 0x3b60fb20 start + 0
Both errors are focussed around line 41 of S3Request.m which reads
[self.urlRequest setValue:self.host forHTTPHeaderField:kHttpHdrHost];
These errors are intemittent and so far I have been unable to replicate the issue exactly, so don't know what the value of self.host when the app crashes.
When the upload succeeds, the value for host is the correct bucket name.
To try and replicate this I have tried to run the requests with the host name set to nil, set to an incorrect bucket name, on wifi, 3G and with no connectivity but none of these conditions causes either condition to occur.
Does anyone know what is causing these issues and therefore what I may have to do to fix them?
===UPDATE===
I finally managed to replicate it, i have no idea how. I just got the SIGSEV.
This is the status of the request object at the the S3Request object at the time of the error
(S3PutObjectRequest) S3PutObjectRequest = {
S3AbstractPutRequest = {
S3Request = {
AmazonServiceRequest = {
NSObject = {
isa = OFSS3PutObjectRequest
}
httpMethod = 0x004bde08 #"GET"
parameters = 0x00000000
endpoint = 0x004c3a38 #"https://s3.amazonaws.com"
userAgent = 0x1d427b60 #"aws-sdk-iOS/1.4.4 iPhone-OS/6.0.1 en_GB"
credentials = 0x00000000
urlRequest = 0x1d1165f0
urlConnection = 0x1d04d680
responseTimer = 0x00000000
requestTag = 0x00000000
serviceName = 0x00000000
regionName = 0x00000000
hostName = 0x00000000
delegate = 0x1c567ba0
}
authorization = 0x00000000
contentLength = 0
contentType = 0x004b9e28 #"image/jpeg"
date = 0x1d0e8340 <not an Objective-C object>
securityToken = 0x00000000
bucket = 0x1d4464f0 #"*****"
key = 0x1d1eb040 #"id_C78ACBEA_58163_0.jpg"
subResource = 0x00000000
}
cannedACL = 0x00000000
fullACL = 0x00000000
storageClass = 0x00000000
serverSideEncryption = 0x00000000
metadata = 0x1d2d6700 0 key/value pairs
}
expiresSet = NO
cacheControl = 0x00000000
contentDisposition = 0x00000000
contentEncoding = 0x00000000
contentMD5 = 0x00000000
filename = 0x00000000
data = 0x1d1a9f00 3814479 bytes
stream = 0x00000000
expect = 0x00000000
generateMD5 = NO
expires = 0
redirectLocation = 0x00000000
}

Related

React native iOS Application crashing with code:0x8BADF00D explanation:scene-update

I'm working on developing an application that requires the use of Mapbox turn-by-turn navigation. I've had to create a custom react native module to help me achieve this, but I think somewhere along my implementation is causing some issues pushing the phone to overheat and eventually crash.
Here's my crash report:
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: FRONTBOARD; [2343432205]
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: application<org.name.appName>:27065 exhausted real (wall clock) time allowance of 10.00 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 40.290 (user 19.790, system 20.500), 67% CPU",
"Elapsed application CPU time (seconds): 1.558, 3% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1b7fd9f90 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1f1c9e254 _pthread_cond_wait + 1228
2 libc++.1.dylib 0x199207ddc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3 libc++.1.dylib 0x199208984 std::__1::__assoc_sub_state::__sub_wait(std::__1::unique_lock<std::__1::mutex>&) + 56
4 libc++.1.dylib 0x1992088d4 std::__1::__assoc_sub_state::copy() + 56
5 libc++.1.dylib 0x199208c18 std::__1::future<void>::get() + 32
6 Mapbox 0x10532a3e0 0x1052e8000 + 271328
7 Mapbox 0x1056ac72c 0x1052e8000 + 3950380
8 CoreFoundation 0x1808aef88 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
9 CoreFoundation 0x18094ac3c ___CFXRegistrationPost_block_invoke + 52
10 CoreFoundation 0x18091dff4 _CFXRegistrationPost + 456
11 CoreFoundation 0x1808c4df4 _CFXNotificationPost + 716
12 Foundation 0x1820c3f58 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96
13 UIKitCore 0x182f93aec __47-[UIApplication _applicationDidEnterBackground]_block_invoke + 316
14 UIKitCore 0x182ef2ecc +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:] + 164
15 UIKitCore 0x18312bdcc -[UIApplication _applicationDidEnterBackground] + 144
16 UIKitCore 0x182f21278 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 840
17 UIKitCore 0x182edbaf0 _UIScenePerformActionsWithLifecycleActionMask + 104
18 UIKitCore 0x183007438 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224
19 UIKitCore 0x183128104 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 248
20 UIKitCore 0x1833692f8 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 760
21 UIKitCore 0x1832f4818 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340
22 UIKitCore 0x182edc8f4 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 196
23 UIKitCore 0x182f9d160 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892
24 UIKitCore 0x182ede804 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 276
25 UIKitCore 0x182fc9448 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384
26 UIKitCore 0x1834515cc __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.613 + 776
27 UIKitCore 0x182f0d13c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256
28 UIKitCore 0x182f50a50 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 288
29 UIKitCore 0x182eda834 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 492
30 FrontBoardServices 0x192567b30 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 528
31 FrontBoardServices 0x19258077c __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 152
32 FrontBoardServices 0x19256506c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
33 FrontBoardServices 0x19256b540 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 396
34 libdispatch.dylib 0x18058f670 _dispatch_client_callout + 20
35 libdispatch.dylib 0x180593128 _dispatch_block_invoke_direct + 264
36 FrontBoardServices 0x1925669c4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
37 FrontBoardServices 0x192565d8c -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
38 FrontBoardServices 0x19256a414 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
39 CoreFoundation 0x18093f0d0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
40 CoreFoundation 0x18094fd90 __CFRunLoopDoSource0 + 208
41 CoreFoundation 0x18088a104 __CFRunLoopDoSources0 + 376
42 CoreFoundation 0x18088f8a4 __CFRunLoopRun + 820
43 CoreFoundation 0x1808a3468 CFRunLoopRunSpecific + 600
44 GraphicsServices 0x19c44738c GSEventRunModal + 164
45 UIKitCore 0x1832465d0 -[UIApplication _run] + 1100
46 UIKitCore 0x182fc4f74 UIApplicationMain + 364
47 appName 0x104368880 0x104364000 + 18560
48 dyld 0x104f19aa4 start + 520
And here's my code:
#objc func tappedButton(sender: UIButton) {
guard let routeResponse = routeResponse, let navigationRouteOptions = routeOptions else { return }
let parentVC = self.parentViewController
let navigationOptions = NavigationOptions(simulationMode: .never)
let navigationViewController = NavigationViewController(for: routeResponse, routeIndex: 0,
routeOptions: navigationRouteOptions, navigationOptions: navigationOptions)
navigationViewController.delegate = self
parentVC!.addChild(navigationViewController)
self.addSubview(navigationViewController.view)
navigationViewController.view.frame = self.bounds
navigationViewController.didMove(toParent: parentVC)
self.navigationViewController = navigationViewController
}
I needed to add the child this way with to get it to work with react native since I can't create the native module as a UIViewController with the main app being a UIViewController.
I added this to create a parentVC:
extension UIView {
var parentViewController: UIViewController? {
var parentResponder: UIResponder? = self
while parentResponder != nil {
parentResponder = parentResponder!.next
if let viewController = parentResponder as? UIViewController {
return viewController
}
}
return nil
}
}
Any help would be greatly appreciated!

coder.decodeDouble causing crashes on app updates, value was previously an optional

I have an object that stores latitude and longitude coordinates. At one point, they were stored as an Optional Double?. I have since changed so it is a non optional Double. Now I see random crash logs from what I assume is users updating their app.
I tried checking to make sure that there is a value there, but it is still causing the crash.
let lat: Double
...
required init (coder aDecoder: NSCoder) {
...
if aDecoder.containsValue(forKey: "lat") {
lat = aDecoder.decodeDouble(forKey: "lat") //here is the crash
}else{
lat = 0
}
...
}
I previously came across this issue and used the following code to get around it, but Xcode says I cannot decode Doubles from objects any more
if let v = aDecoder.decodeObject(forKey: "lat") as? Double{//*** -[NSKeyedUnarchiver decodeObjectForKey:] : value for key ( lat ) is not an object. This will become an error in the future.
lat = v
}else{
if aDecoder.containsValue(forKey: "lat") {
lat = aDecoder.decodeDouble(forKey: "lat")
}else{
lat = 0
}
}
Here is a crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x18120004c __exceptionPreprocess + 220 (NSException.m:200)
1 libobjc.A.dylib 0x199874f54 objc_exception_throw + 60 (objc-exception.mm:565)
2 Foundation 0x182aa8e68 -[NSCoder __failWithException:] + 180 (NSCoder.m:0)
3 Foundation 0x182aa8fd4 -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 260 (NSCoder.m:1191)
4 Foundation 0x182a4689c _decodeDouble + 660 (NSKeyedArchiver.m:0)
5 Foundation 0x1829bd3cc -[NSKeyedUnarchiver decodeDoubleForKey:] + 172 (NSKeyedArchiver.m:3918)
6 *Project* 0x102eefb98 specialized Location.init(coder:) + 1936 (Location.swift:145)
7 *Project* 0x102eed854 init + 4 (<compiler-generated>:0)
8 *Project* 0x102eed854 #objc Location.init(coder:) + 32
9 Foundation 0x1829c0268 _decodeObjectBinary + 2560 (NSKeyedArchiver.m:3058)
10 Foundation 0x1829a4a78 _decodeObject + 180 (NSKeyedArchiver.m:3324)
11 Foundation 0x1829c4304 -[NSKeyedUnarchiver decodeObjectForKey:] + 176 (NSKeyedArchiver.m:3344)
12 Foundation 0x182a272b8 +[NSKeyedUnarchiver unarchiveObjectWithData:] + 84 (NSKeyedArchiver.m:2390)
13 *Project* 0x102ee729c APS.loadOnDeckFromiCloud() + 240 (APS.swift:138)
14 *Project* 0x102ee7058 APS.().init() + 860 (APS.swift:105)
15 *Project* 0x102ee6ce8 one-time initialization function for SI + 40 (APS.swift:0)
16 libdispatch.dylib 0x180e72660 _dispatch_client_callout + 20 (object.m:560)
17 libdispatch.dylib 0x180e73f08 _dispatch_once_callout + 32 (once.c:52)
18 *Project* 0x102f3417c specialized DivertToOnboardingIfNeeded_VC.viewWillAppear(_:) + 1536 (APS.swift:97)
19 *Project* 0x102f334a8 viewWillAppear + 4 (<compiler-generated>:0)
20 *Project* 0x102f334a8 #objc DivertToOnboardingIfNeeded_VC.viewWillAppear(_:) + 28
21 UIKitCore 0x1837ba3e0 -[UIViewController _setViewAppearState:isAnimating:] + 664 (UIViewController.m:5522)
22 UIKitCore 0x1838e9004 -[UIViewController __viewWillAppear:] + 120 (UIViewController.m:5654)
23 UIKitCore 0x1838ba5b0 -[UINavigationController _startTransition:fromViewController:toViewController:] + 720 (UINavigationController.m:7329)
24 UIKitCore 0x183ae657c -[UINavigationController _startDeferredTransitionIfNeeded:] + 876 (UINavigationController.m:7494)
25 UIKitCore 0x1839bb6ac -[UINavigationController __viewWillLayoutSubviews] + 168 (UINavigationController.m:7806)
26 UIKitCore 0x1838e20f4 -[UILayoutContainerView layoutSubviews] + 228 (UILayoutContainerView.m:88)
27 UIKitCore 0x18379aed8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2620 (UIView.m:18347)
28 QuartzCore 0x184ef6e24 CA::Layer::layout_if_needed(CA::Transaction*) + 536 (CALayer.mm:10038)
29 QuartzCore 0x184ee9644 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 (CALayer.mm:2480)
30 QuartzCore 0x184efdc6c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 524 (CAContextInternal.mm:2586)
31 QuartzCore 0x184f06560 CA::Transaction::commit() + 680 (CATransactionInternal.mm:449)
32 UIKitCore 0x183963f9c __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 44 (UIApplication.m:11470)
33 CoreFoundation 0x1811d9924 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 (CFRunLoop.c:1820)
34 CoreFoundation 0x1811da820 __CFRunLoopDoBlocks + 412 (CFRunLoop.c:1862)
35 CoreFoundation 0x181172808 __CFRunLoopRun + 840 (CFRunLoop.c:2953)
36 CoreFoundation 0x1811863b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
37 GraphicsServices 0x19cb1638c GSEventRunModal + 164 (GSEvent.c:2200)
38 UIKitCore 0x183b266a8 -[UIApplication _run] + 1100 (UIApplication.m:3493)
39 UIKitCore 0x1838a57f4 UIApplicationMain + 2092 (UIApplication.m:5046)
40 *Project* 0x102e93388 main + 68 (MapBox_VC.swift:15)
41 dyld 0x103169a24 start + 520 (dyldMain.cpp:876)
How do I check the value stored in lat to make sure it is a Double ? (Non optional)

Unable to symbolicate the crash log with a .dsym file

I got a crash log from apple , to symbolicate it , I'm using the symbolicate crash.
However, I'm unable to get it done.
When I run the atos command
atos -arch arm64 -o MyApp.app.dSYM/Contents/Resources/DWARF/Myapp -l
0x1f1bc2000 0x00000001f1be50dc
for a line (which say thread 0 crashed from the log),
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001f1be50dc 0x1f1bc2000 + 143580
I got:
NSNotificationName.TimeOutUserInteraction.unsafeMutableAddressor (in MyApp) (InterractionUIApplication.swift:0)
Does this mean, NSNotificationName.TimeOutUserInteraction.unsafeMutableAddressor is causing the crash ?
From the Xcode device logs:I'm able to retrieve:
Last Exception Backtrace:
0 CoreFoundation 0x1d590a3a8 __exceptionPreprocess + 232
1 libobjc.A.dylib 0x1d4b0fd00 objc_exception_throw + 59
2 CoreFoundation 0x1d58229f8 -[NSObject+ 223736 (NSObject) doesNotRecognizeSelector:] + 143
3 CoreFoundation 0x1d590fd54 ___forwarding___ + 1411
4 CoreFoundation 0x1d5911b50 _CF_forwarding_prep_0 + 95
5 FBSDKCoreKit 0x105f67530 0x105f24000 + 275760
6 FBSDKCoreKit 0x105f673ac 0x105f24000 + 275372
7 FBSDKCoreKit 0x105f2df28 0x105f24000 + 40744
8 FBSDKCoreKit 0x105f2b0b0 0x105f24000 + 28848
9 FBSDKCoreKit 0x105f2afbc 0x105f24000 + 28604
10 FBSDKCoreKit 0x105f70fe0 0x105f24000 + 315360
11 FBSDKCoreKit 0x105f7078c 0x105f24000 + 313228
12 FBSDKCoreKit 0x105f2bb28 0x105f24000 + 31528
13 FBSDKCoreKit 0x105f34cac 0x105f24000 + 68780
14 Foundation 0x1d638115c __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 27
15 CoreFoundation 0x1d5878acc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 27
16 CoreFoundation 0x1d5878a8c ___CFXRegistrationPost_block_invoke + 67
17 CoreFoundation 0x1d5877f30 _CFXRegistrationPost + 419
18 CoreFoundation 0x1d5877bbc ___CFXNotificationPost_block_invoke + 99
19 CoreFoundation 0x1d57ee768 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1503
20 CoreFoundation 0x1d5877664 _CFXNotificationPost + 715
21 Foundation 0x1d62727c4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 71
22 UIKitCore 0x202bd2398 -[UIApplication _stopDeactivatingForReason:] + 1339
23 UIKitCore 0x20247010c __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 487
24 UIKitCore 0x202470e5c _performActionsWithDelayForTransitionContext + 119
25 UIKitCore 0x20246feb8 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 259
26 UIKitCore 0x202474ea8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 363
27 UIKitCore 0x2027bb904 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 479
28 FrontBoardServices 0x1d82ccc58 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_3 + 243
29 libdispatch.dylib 0x1d5319884 _dispatch_client_callout + 19
30 libdispatch.dylib 0x1d531ce5c _dispatch_block_invoke_direct + 251
31 FrontBoardServices 0x1d830918c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 47
32 FrontBoardServices 0x1d8308e08 -[FBSSerialQueue _performNext] + 435
33 FrontBoardServices 0x1d8309404 -[FBSSerialQueue _performNextFromRunLoopSource] + 55
34 CoreFoundation 0x1d589a444 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27
35 CoreFoundation 0x1d589a3c0 __CFRunLoopDoSource0 + 91
36 CoreFoundation 0x1d5899c7c __CFRunLoopDoSources0 + 179
37 CoreFoundation 0x1d5894950 __CFRunLoopRun + 987
38 CoreFoundation 0x1d5894254 CFRunLoopRunSpecific + 451
39 GraphicsServices 0x1d7ad3d8c GSEventRunModal + 107
40 UIKitCore 0x202bdc4c0 UIApplicationMain + 215
41 MyApp 0x104d97148 0x104d90000 + 29000
42 libdyld.dylib 0x1d5350fd8 start + 3
Code related to the notification:
import UIKit
// User Activity Timer
extension NSNotification.Name {
public static let TimeOutUserInteraction: NSNotification.Name = NSNotification.Name(rawValue: "TimeOutUserInteraction")
}
class InterractionUIApplication: UIApplication {
static let timeoutInSeconds: TimeInterval = 60 * 20 // 20 minutes
private var idleTimer: Timer?
private var enabledUserInteractionTracking: Bool = false
func startUserInternactionTracking() {
enabledUserInteractionTracking = true
resetIdleTimer()
}
func stopUserInternactionTracking() {
enabledUserInteractionTracking = false
if let idleTimer = idleTimer {
idleTimer.invalidate()
}
idleTimer = nil
}
override func sendEvent(_ event: UIEvent) {
super.sendEvent(event)
guard enabledUserInteractionTracking else {
return
}
if idleTimer != nil {
resetIdleTimer()
}
if let touches = event.allTouches {
for touch in touches {
if touch.phase == UITouch.Phase.began {
resetIdleTimer()
}
}
}
// Resent the timer because there was user interaction.
func resetIdleTimer() {
if let idleTimer = idleTimer {
idleTimer.invalidate()
}
idleTimer = Timer.scheduledTimer(timeInterval: InterractionUIApplication.timeoutInSeconds, target: self, selector: #selector(idleTimerExceeded), userInfo: nil, repeats: false)
}
// If the timer reaches the limit as defined in timeoutInSeconds, post this notification.
#objc func idleTimerExceeded() {
NotificationCenter.default.post(name: Notification.Name.TimeOutUserInteraction, object: nil)
}
}
This is the output I got from symbolicatecrash:
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash -v unsymbolicated.crash > symbolicated.crash
Symbolicating unsymbolicated.crash ...
92791 characters read.
Use of uninitialized value $sdkGuess in concatenation (.) or string at /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash line 1369.
SDK guess for tool search is ''
otool path is '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool'
atos path is '/Applications/Xcode.app/Contents/Developer/usr/bin/atos'
symbols path is '/Applications/Xcode.app/Contents/Developer/usr/bin/symbols'
size path is '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size'
Hardware Model xxx
OS Version 12.3.1 Build 16F203
1 binary images referenced:
MyApp (/var/containers/Bundle/Application/42051481-B8DA-47ED-A109-8E17F54C829A/MyApp.app/MyApp)
Num stacks found: 11
0 binary images remain after pruning:
($hwModel, $osVersion, $osBuild) = (xxx, 12.3.1, 16F203)
$versionPattern = {xxx 12.3.1 (16F203),xxx 12.3.1 (16F203) *,12.3.1 (16F203),12.3.1 (16F203) *,12.3.1,16F203,16F203 *}
Symbol directory paths: /Users/venkatanandamuri/Library/Developer/Xcode/iOS DeviceSupport/12.3.1 (16F203) arm64e/Symbols
Finding Symbols:
0 binary images were found.
No symbolic information found
The crash log I got is:
{"app_name":"MyApp","timestamp":"2019-06-28 11:45:18.77 -0700","app_version":"3.0.0","slice_uuid":"dc2048fb-776c-34d2-a7f3-0be90aa110c7","adam_id":1217032222,"build_version":"34","bundleID":"com.tes.mobile.ab11","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 12.3.1 (16F203)","incident_id":"F61FEE35-605C-43A2-A0DE-3F64A3164371","name":"MyApp"}
Incident Identifier: F61FEE35-605C-43A2-A0DE-3F64A3164371
CrashReporter Key: 14224d89ad771b01037a2ad242ffbbbdda806dd4
Hardware Model: xxx
Process: MyApp [13107]
Path: /private/var/containers/Bundle/Application/42051481-B8DA-47ED-A109-8E17F54C829A/MyApp.app/Myapp
Identifier: com.test.mobile.ab11
Version: 34 (3.0.0)
AppStoreTools: 10G3
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: com.test.mobile.ab11 [6071]
Date/Time: 2019-06-28 11:45:18.5650 -0700
Launch Time: 2019-06-28 11:45:08.3705 -0700
OS Version: iPhone OS 12.3.1 (16F203)
Baseband Version: 7.70.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Last Exception Backtrace:
(0x1f204827c 0x1f12229f8 0x1f1f64ab8 0x1f204dac4 0x1f204f75c 0x101d674b8 0x101d67320 0x101d2dce0 0x101d2ae68 0x101d2ad74 0x101d70f68 0x101d70714 0x101d2b8e0 0x101d34708 0x1f1fb9318 0x1f1fb92e4 0x1f1fb87d8 0x1f1fb8484 0x1f1f31d64 0x1f1fb7f34 0x1f29a07f4 0x21e53ad0c 0x21de094a0 0x21de0a188 0x21de0925c 0x21de0df5c 0x21e13e054 0x1f49c45d8 0x1f1a887d4 0x1f1a2d5d8 0x1f49fe040 0x1f49fdcdc 0x1f49fe294 0x1f1fda018 0x1f1fd9f98 0x1f1fd9880 0x1f1fd47bc 0x1f1fd40b0 0x1f41d479c 0x21e544978 0x100cdf138 0x1f1a998e0)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001f1be50dc 0x1f1bc2000 + 143580
1 libsystem_pthread.dylib 0x00000001f1c5e094 0x1f1c5c000 + 8340
2 libsystem_c.dylib 0x00000001f1b3ef4c 0x1f1ae4000 + 372556
3 libsystem_c.dylib 0x00000001f1b3eeb4 0x1f1ae4000 + 372404
4 libc++abi.dylib 0x00000001f120b788 0x1f120a000 + 6024
5 libc++abi.dylib 0x00000001f120b934 0x1f120a000 + 6452
6 libobjc.A.dylib 0x00000001f1222e00 0x1f121d000 + 24064
7 MyApp 0x0000000100d5dd34 0x100cd8000 + 548148
8 libc++abi.dylib 0x00000001f1217838 0x1f120a000 + 55352
9 libc++abi.dylib 0x00000001f12178c4 0x1f120a000 + 55492
10 libdispatch.dylib 0x00000001f1a887e8 0x1f1a28000 + 395240
11 libdispatch.dylib 0x00000001f1a2d5d8 0x1f1a28000 + 21976
12 FrontBoardServices 0x00000001f49fe040 0x1f49b8000 + 286784
13 FrontBoardServices 0x00000001f49fdcdc 0x1f49b8000 + 285916
14 FrontBoardServices 0x00000001f49fe294 0x1f49b8000 + 287380
15 CoreFoundation 0x00000001f1fda018 0x1f1f30000 + 696344
16 CoreFoundation 0x00000001f1fd9f98 0x1f1f30000 + 696216
17 CoreFoundation 0x00000001f1fd9880 0x1f1f30000 + 694400
18 CoreFoundation 0x00000001f1fd47bc 0x1f1f30000 + 673724
19 CoreFoundation 0x00000001f1fd40b0 0x1f1f30000 + 671920
20 GraphicsServices 0x00000001f41d479c 0x1f41ca000 + 42908
21 UIKitCore 0x000000021e544978 0x21dc88000 + 9161080
22 MyApp 0x0000000100cdf138 0x100cd8000 + 28984
23 libdyld.dylib 0x00000001f1a998e0 0x1f1a98000 + 6368

ReactiveCocoa Issue

I'm attempting to use ReactiveCocoa in my project to handle the population of a UITableView.
When I load the data if none is available, I want to set the hidden property of tableView.backgroundView to false. Here's what I have so far:
func loadData() {
let dataSource = tableView.dataSource as! BlockedTableViewDataSource
let load = dataSource.load(currentUser) # RACSignal
load.map {
return ($0 as! [AnyObject]).count > 0
}.startWith(true).distinctUntilChanged().setKeyPath("hidden", onObject: tableView.backgroundView!)
load.subscribeError({ error in
println(error)
}, completed: {
self.tableView.reloadData()
self.refreshControl?.endRefreshing()
})
}
This however errors out saying that I need to wait for the network request to finish. I'm using Parse to fetch the data but I'm thinking that my ReactiveCocoa code just isn't set up correctly and is causing this error. If I comment out the load.map... portion the table populates as expected.
How would one going about implementing this in the "Reactive Way"?
Update #1
Here is the load function of the dataSource
func load(user: User) -> RACSignal {
return self.getBlocks(user).doNext {
self.blocks = $0 as! [Block]
}
}
private func getBlocks(fromUser: User) -> RACSignal {
let query = Block.query()!
query.whereKey("fromUser", equalTo: fromUser)
query.includeKey("toUser")
return query.rac_findObjects()
}
Update #2
2015-04-28 08:20:02.612 ohio[90547:2154845] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This query has an outstanding network connection. You have to wait until it's done.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010b840c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010bc5dbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010b840b9d +[NSException raise:format:] + 205
3 ohio 0x0000000107facb1b -[PFQuery checkIfCommandIsRunning] + 77
4 ohio 0x0000000107facb71 -[PFQuery markAsRunning:] + 46
5 ohio 0x0000000107fad105 -[PFQuery _findObjectsAsync:after:] + 234
6 ohio 0x0000000107faf0a0 -[PFQuery findObjectsInBackgroundWithBlock:] + 288
7 ohio 0x0000000107d9532d _TFFE4ohioCSo7PFQuery15rac_findObjectsFS0_FT_CSo9RACSignalU_FGSQPSo13RACSubscriber__GSQCSo13RACDisposable_ + 205
8 ohio 0x0000000107d6639e _TTRXFo_oGSQPSo13RACSubscriber___oGSQCSo13RACDisposable__XFo_iGSQPS____iGSQS0___ + 30
9 ohio 0x0000000107d944c1 _TPA__TTRXFo_oGSQPSo13RACSubscriber___oGSQCSo13RACDisposable__XFo_iGSQPS____iGSQS0___ + 81
10 ohio 0x0000000107d663d4 _TTRXFo_iGSQPSo13RACSubscriber___iGSQCSo13RACDisposable__XFo_oGSQPS____oGSQS0___ + 36
11 ohio 0x0000000107d66418 _TTRXFo_oGSQPSo13RACSubscriber___oGSQCSo13RACDisposable__XFdCb_dGSQPS____aGSQS0___ + 56
12 ohio 0x0000000107eeacca __30-[RACDynamicSignal subscribe:]_block_invoke + 74
13 ohio 0x0000000107f35b8e -[RACSubscriptionScheduler schedule:] + 478
14 ohio 0x0000000107eeab9d -[RACDynamicSignal subscribe:] + 765
15 ohio 0x0000000107f28f1d -[RACSignal(Subscription) subscribeNext:error:completed:] + 1133
16 ohio 0x0000000107f004cc __32-[RACSignal(Operations) doNext:]_block_invoke + 396
17 ohio 0x0000000107eeacca __30-[RACDynamicSignal subscribe:]_block_invoke + 74
18 ohio 0x0000000107f35b8e -[RACSubscriptionScheduler schedule:] + 478
19 ohio 0x0000000107eeab9d -[RACDynamicSignal subscribe:] + 765
20 ohio 0x0000000107f2999e -[RACSignal(Subscription) subscribeError:completed:] + 766
21 ohio 0x0000000107dc5fdb _TFC4ohio26BlockedTableViewController8loadDatafS0_FCS_4UserT_ + 3083
22 ohio 0x0000000107dc6775 _TFC4ohio26BlockedTableViewController11viewDidLoadfS0_FT_T_ + 501
23 ohio 0x0000000107dc7702 _TToFC4ohio26BlockedTableViewController11viewDidLoadfS0_FT_T_ + 34
24 UIKit 0x000000010a142210 -[UIViewController loadViewIfRequired] + 738
25 UIKit 0x000000010a14240e -[UIViewController view] + 27
26 UIKit 0x000000010a167297 -[UINavigationController _startCustomTransition:] + 633
27 UIKit 0x000000010a1733bf -[UINavigationController _startDeferredTransitionIfNeeded:] + 386
28 UIKit 0x000000010a173f0e -[UINavigationController __viewWillLayoutSubviews] + 43
29 UIKit 0x000000010a2be715 -[UILayoutContainerView layoutSubviews] + 202
30 UIKit 0x000000011915093e -[UILayoutContainerViewAccessibility layoutSubviews] + 43
31 UIKit 0x000000010a091a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
32 QuartzCore 0x0000000109d12ec2 -[CALayer layoutSublayers] + 146
33 QuartzCore 0x0000000109d076d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
34 QuartzCore 0x0000000109d07546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
35 QuartzCore 0x0000000109c73886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
36 QuartzCore 0x0000000109c74a3a _ZN2CA11Transaction6commitEv + 462
37 QuartzCore 0x0000000109c750eb _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
38 CoreFoundation 0x000000010b773ca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
39 CoreFoundation 0x000000010b773c00 __CFRunLoopDoObservers + 368
40 CoreFoundation 0x000000010b769a33 __CFRunLoopRun + 1123
41 CoreFoundation 0x000000010b769366 CFRunLoopRunSpecific + 470
42 GraphicsServices 0x000000010cfc8a3e GSEventRunModal + 161
43 UIKit 0x000000010a011900 UIApplicationMain + 1282
44 ohio 0x0000000107d86df7 main + 135
45 libdyld.dylib 0x000000010c3c1145 start + 1
46 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The method rac_findObjects() returns a cold signal. It means that each time someone subscribes to this signal, its side effects (that is, executing the underlying network request) will be repeated. And it seems that PFQuery doesn't allow to send more than one simultaneous request, hence the error message.
In your case you are making two subscriptions for the load signal, because calling setKeyPath also creates one. So the networks request gets executed twice, which results in the error you posted.
As suggested in the linked GitHub issue, you can use RACMulticastConnection to ensure that the side effects (the network request) are executed only once, no matter how many subscribers there are. For example:
let load = dataSource.load(currentUser).publish().autoconnect()

AWS batchGetItem NSInvalidArgumentException JSONKeyPathsByPropertyKey: unrecognized selector

I'm trying to get some rows from DynamoDB in a Swift application. At the very last line in my code below I get a NSInvalidArgumentException. I think it must be because my request is not formatted correctly, but I don't know what is wrong. In the docs (batch operation sample) for the java sdk they use TableKeysAndAttributes, which doesn't seem to exist in the iOS SDK.
Here is my code:
var venueIdAttribute = AWSDynamoDBAttributeValue()
venueIdAttribute.N = "2164156"
var venueIdCondition = AWSDynamoDBCondition()
venueIdCondition.comparisonOperator = .EQ // Hash Key must always be Equals
venueIdCondition.attributeValueList = [venueIdAttribute]
var startDateAttribute = AWSDynamoDBAttributeValue()
var startString = String(format:"%1.0f", lastSyncDate.timeIntervalSince1970 * 1000)
startDateAttribute.N = String(format:"%1.0f", lastSyncDate.timeIntervalSince1970 * 1000)
var dateCondition = AWSDynamoDBCondition()
dateCondition.comparisonOperator = .GT
dateCondition.attributeValueList = [startDateAttribute];
var keysArray : NSArray = [["venueId" : venueIdCondition, "dateInterval" : dateCondition]]
var tableDict : NSDictionary = ["Keys":keysArray]
var requestMap : NSDictionary = ["myTable":tableDict]
var request : AWSDynamoDBBatchGetItemInput = AWSDynamoDBBatchGetItemInput()
request.requestItems = requestMap
request.returnConsumedCapacity = AWSDynamoDBReturnConsumedCapacity.Total
var response : BFTask = dynamoDB.batchGetItem(request) // This is synchronous
Here is the error:
2014-12-18 13:23:17.002 TouchDashboard[8066:503166] +[NSDictionaryI JSONKeyPathsByPropertyKey]: unrecognized selector sent to class 0x10a9930e8
2014-12-18 13:23:17.010 TouchDashboard[8066:503166] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[__NSDictionaryI JSONKeyPathsByPropertyKey]: unrecognized selector sent to class 0x10a9930e8'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a6ebf35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c5b1bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010a6f2f4d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010a64b27c ___forwarding_ + 988
4 CoreFoundation 0x000000010a64ae18 _CF_forwarding_prep_0 + 120
5 TouchDashboard 0x0000000109b1176a -[MTLJSONAdapter initWithModel:] + 490
6 TouchDashboard 0x0000000109b0fc47 +[MTLJSONAdapter JSONDictionaryFromModel:] + 87
7 TouchDashboard 0x00000001099a47c5 +[AZModelUtility JSONDictionaryFromMapMTLDictionary:] + 517
8 TouchDashboard 0x0000000109a91c5b 59+[AWSDynamoDBBatchGetItemInput requestItemsJSONTransformer]_block_invoke_2 + 75
9 TouchDashboard 0x0000000109b21718 -[MTLReversibleValueTransformer reverseTransformedValue:] + 88
10 TouchDashboard 0x0000000109b11b90 __32-[MTLJSONAdapter JSONDictionary]_block_invoke + 480
11 CoreFoundation 0x000000010a62d766 __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 102
12 CoreFoundation 0x000000010a62d66c -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204
13 TouchDashboard 0x0000000109b1192c -[MTLJSONAdapter JSONDictionary] + 300
14 TouchDashboard 0x0000000109b0fc5b +[MTLJSONAdapter JSONDictionaryFromModel:] + 107
15 TouchDashboard 0x00000001099a6829 -[AWSDynamoDB invokeRequest:HTTPMethod:URLString:targetPrefix:operationName:outputClass:] + 313
16 TouchDashboard 0x00000001099a6bd9 -[AWSDynamoDB batchGetItem:] + 153
17 TouchDashboard 0x000000010991a0d7 _TFC14TouchDashboard14ViewController9batchSyncfS0_FT_T_ + 10663
18 TouchDashboard 0x0000000109917349 _TFC14TouchDashboard14ViewController11viewDidLoadfS0_FT_T_ + 1161
19 TouchDashboard 0x0000000109917462 _TToFC14TouchDashboard14ViewController11viewDidLoadfS0_FT_T_ + 34
20 UIKit 0x000000010b41ea90 -[UIViewController loadViewIfRequired] + 738
21 UIKit 0x000000010b41ec8e -[UIViewController view] + 27
22 UIKit 0x000000010b33dca9 -[UIWindow addRootViewControllerViewIfPossible] + 58
23 UIKit 0x000000010b33e041 -[UIWindow _setHidden:forced:] + 247
24 UIKit 0x000000010b34a72c -[UIWindow makeKeyAndVisible] + 42
25 UIKit 0x000000010b2f5061 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2628
26 UIKit 0x000000010b2f7d2c -[UIApplication _runWithMainScene:transitionContext:completion:] + 1350
27 UIKit 0x000000010b2f6bf2 -[UIApplication workspaceDidEndTransaction:] + 179
28 FrontBoardServices 0x000000010ebe92a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
29 CoreFoundation 0x000000010a62153c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12
30 CoreFoundation 0x000000010a617285 __CFRunLoopDoBlocks + 341
31 CoreFoundation 0x000000010a616a43 __CFRunLoopRun + 851
32 CoreFoundation 0x000000010a616486 CFRunLoopRunSpecific + 470
33 UIKit 0x000000010b2f6669 -[UIApplication _run] + 413
34 UIKit 0x000000010b2f9420 UIApplicationMain + 1282
35 TouchDashboard 0x000000010992ba2e top_level_code + 78
36 TouchDashboard 0x000000010992ba6a main + 42
37 libdyld.dylib 0x000000010cd8b145 start + 1
38 ??? 0x0000000000000001 0x0 + 1
AWSDynamoDBBatchGetItemInput's requestItems property needs to be a dictionary of the following key/value pair:
NSString (a table name) : AWSDynamoDBKeysAndAttributes (KeysAndAttributes)
Currently, you are passing an instance of NSDictionary as a value. Once you update your code snippet to use AWSDynamoDBKeysAndAttributes, it should work.

Resources