Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.01 KB | None | 0 0
  1. static func loginOnServerUrl(serverURL: String, user: String, password: String,
  2. successCallback: ((JSON) -> Void)? = nil, failureCallback: ((Error) -> Void)? = nil){
  3.  
  4. let params = [
  5. ApiParams.ACTION : "login",
  6. ApiParams.LoginParams.USER : user,
  7. ApiParams.LoginParams.PASSWORD : password,
  8. ]
  9.  
  10. Alamofire.request("http://(serverURL)/AppSrv", method: .get, parameters: params).responseJSON { response in
  11. switch response.result {
  12. case .success(let value):
  13. //JSON raiz
  14. let json = JSON(value)
  15.  
  16. for (key, value) in json.acceptingSigleValueAsArray {
  17. log("(key) : (value)")
  18. }
  19.  
  20.  
  21. if let successCallback = successCallback {
  22. successCallback(json)
  23. }
  24.  
  25.  
  26. case .failure(let error):
  27. log(error.localizedDescription)
  28. if let failureCallback = failureCallback {
  29. failureCallback(error)
  30. }
  31. }
  32. }
  33. }
  34.  
  35. Incident Identifier: ****
  36. CrashReporter Key: *****
  37. Hardware Model: iPad5,2
  38. Process: ****
  39. Path: ****
  40. Identifier: ****
  41. Version: 1.42 (1.2.3a)
  42. Code Type: ARM-64 (Native)
  43. Role: Foreground
  44. Parent Process: launchd [1]
  45. Coalition: ****
  46.  
  47.  
  48. Date/Time: 2016-10-21 10:16:08.9811 +0200
  49. Launch Time: 2016-10-21 10:16:06.2504 +0200
  50. OS Version: iPhone OS 10.0.2 (14A456)
  51. Report Version: 104
  52.  
  53. Exception Type: EXC_BAD_ACCESS (SIGSEGV)
  54. Exception Subtype: KERN_INVALID_ADDRESS at 0x000000059480bec8
  55. Termination Signal: Segmentation fault: 11
  56. Termination Reason: Namespace SIGNAL, Code 0xb
  57. Terminating Process: exc handler [0]
  58. Triggered by Thread: 0
  59.  
  60. Filtered syslog:
  61. None found
  62.  
  63. Thread 0 name: Dispatch queue: com.apple.main-thread
  64. Thread 0 Crashed:
  65. 0 libswiftCore.dylib 0x0000000100e19b6c 0x100c38000 + 1973100
  66. 1 myapp 0x00000001000c4d88 static ServerManager.(pingOnServerUrl(serverUrl : String, successCallback : (Int64) -> ()?, failureCallback : (Error) -> ()?) -> ()).(closure #1) (ServerManager.swift:0)
  67. 2 Alamofire 0x00000001003aca84 specialized DataRequest.(response<A where ...> (queue : DispatchQueue?, responseSerializer : A, completionHandler : (DataResponse<A.SerializedObject>) -> ()) -> Self).(closure #1).(closure #1) (ResponseSerialization.swift:0)
  68. 3 libdispatch.dylib 0x00000001889f1200 _dispatch_call_block_and_release + 24
  69. 4 libdispatch.dylib 0x00000001889f11c0 _dispatch_client_callout + 16
  70. 5 libdispatch.dylib 0x00000001889f5d6c _dispatch_main_queue_callback_4CF + 1000
  71. 6 CoreFoundation 0x0000000189b15f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
  72. 7 CoreFoundation 0x0000000189b13b18 __CFRunLoopRun + 1660
  73. 8 CoreFoundation 0x0000000189a42048 CFRunLoopRunSpecific + 444
  74. 9 GraphicsServices 0x000000018b4c5198 GSEventRunModal + 180
  75. 10 UIKit 0x000000018fa15628 -[UIApplication _run] + 684
  76. 11 UIKit 0x000000018fa10360 UIApplicationMain + 208
  77. 12 myapp 0x00000001000bf024 main (AppDelegate.swift:16)
  78. 13 libdyld.dylib 0x0000000188a245b8 start + 4
  79.  
  80. Thread 1:
  81. 0 libsystem_kernel.dylib 0x0000000188b36a88 __workq_kernreturn + 8
  82. 1 libsystem_pthread.dylib 0x0000000188bf936c _pthread_wqthread + 1452
  83. 2 libsystem_pthread.dylib 0x0000000188bf8db4 start_wqthread + 4
  84.  
  85. Thread 2:
  86. 0 libsystem_kernel.dylib 0x0000000188b36a88 __workq_kernreturn + 8
  87. 1 libsystem_pthread.dylib 0x0000000188bf936c _pthread_wqthread + 1452
  88. 2 libsystem_pthread.dylib 0x0000000188bf8db4 start_wqthread + 4
  89.  
  90. Thread 3:
  91. 0 libsystem_pthread.dylib 0x0000000188bf8db0 start_wqthread + 0
  92.  
  93. Thread 4:
  94. 0 libsystem_pthread.dylib 0x0000000188bf8db0 start_wqthread + 0
  95.  
  96. Thread 5:
  97. 0 libsystem_kernel.dylib 0x0000000188b36a88 __workq_kernreturn + 8
  98. 1 libsystem_pthread.dylib 0x0000000188bf936c _pthread_wqthread + 1452
  99. 2 libsystem_pthread.dylib 0x0000000188bf8db4 start_wqthread + 4
  100.  
  101. Thread 6 name: com.apple.uikit.eventfetch-thread
  102. Thread 6:
  103. 0 libsystem_kernel.dylib 0x0000000188b1816c mach_msg_trap + 8
  104. 1 libsystem_kernel.dylib 0x0000000188b17fdc mach_msg + 72
  105. 2 CoreFoundation 0x0000000189b15cec __CFRunLoopServiceMachPort + 192
  106. 3 CoreFoundation 0x0000000189b13908 __CFRunLoopRun + 1132
  107. 4 CoreFoundation 0x0000000189a42048 CFRunLoopRunSpecific + 444
  108. 5 Foundation 0x000000018a550b1c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
  109. 6 Foundation 0x000000018a57160c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
  110. 7 UIKit 0x000000019038ac7c -[UIEventFetcher threadMain] + 136
  111. 8 Foundation 0x000000018a64e50c __NSThread__start__ + 1024
  112. 9 libsystem_pthread.dylib 0x0000000188bfb860 _pthread_body + 240
  113. 10 libsystem_pthread.dylib 0x0000000188bfb770 _pthread_body + 0
  114. 11 libsystem_pthread.dylib 0x0000000188bf8dbc thread_start + 4
  115.  
  116. Thread 7 name: com.apple.NSURLConnectionLoader
  117. Thread 7:
  118. 0 libsystem_kernel.dylib 0x0000000188b1816c mach_msg_trap + 8
  119. 1 libsystem_kernel.dylib 0x0000000188b17fdc mach_msg + 72
  120. 2 CoreFoundation 0x0000000189b15cec __CFRunLoopServiceMachPort + 192
  121. 3 CoreFoundation 0x0000000189b13908 __CFRunLoopRun + 1132
  122. 4 CoreFoundation 0x0000000189a42048 CFRunLoopRunSpecific + 444
  123. 5 CFNetwork 0x000000018a22fcec +[NSURLConnection(Loader) _resourceLoadLoop:] + 336
  124. 6 Foundation 0x000000018a64e50c __NSThread__start__ + 1024
  125. 7 libsystem_pthread.dylib 0x0000000188bfb860 _pthread_body + 240
  126. 8 libsystem_pthread.dylib 0x0000000188bfb770 _pthread_body + 0
  127. 9 libsystem_pthread.dylib 0x0000000188bf8dbc thread_start + 4
  128.  
  129. Thread 0 crashed with ARM Thread State (64-bit):
  130. x0: 0x0000000170246c30 x1: 0x0000000170246c30 x2: 0x0000000000000008 x3: 0x0000000188b7c250
  131. x4: 0x0000000100e099a4 x5: 0x0000000100df14f8 x6: 0x0000000000000065 x7: 0x0000000170287c78
  132. x8: 0x000000059480bea8 x9: 0x0000000ffffffff8 x10: 0x0000000000000001 x11: 0xbaddc0dedeadbead
  133. x12: 0x0000000000000177 x13: 0x0000000000000177 x14: 0x0000000100be6a30 x15: 0x0000000000000000
  134. x16: 0x0000000100e19b54 x17: 0xb000000000000003 x18: 0x0000000000000000 x19: 0x0000000000000000
  135. x20: 0x0000000100e94060 x21: 0x00000001ae195ef8 x22: 0x000000017046cf40 x23: 0xb000000000000003
  136. x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x0000000000000004 x27: 0x0000000100be6a30
  137. x28: 0x0000000170246c30 fp: 0x000000016fd46b60 lr: 0x00000001000c4d88
  138. sp: 0x000000016fd46870 pc: 0x0000000100e19b6c cpsr: 0x20000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement