Cannot InsertText with Message App Extension - xamarin

I'm creating a Message App Extension in Xamarin and am getting a NSException error when trying to InsertText from the MessagesViewController. I do not see error messages when building, just when this InsertText code is executed. Appreciate your help/expertise.
InsertText code
public void InsertMessage(string message)
{
ActiveConversation.InsertText(message, (err) => {
if (err != null)
{
Console.WriteLine("ERROR: " + err.ToString());
}
});
Console.WriteLine("Inserted text");
}
Console Error Message
2022-10-19 14:17:02.869031-0700 MobileSMS[40085:1435095] -[CKIMDaemonController preWarm]: unrecognized selector sent to instance 0x60000326aa80
2022-10-19 14:17:02.871325-0700 MobileSMS[40085:1435095] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CKIMDaemonController preWarm]: unrecognized selector sent to instance 0x60000326aa80'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff800427378 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dbaf objc_exception_throw + 48
2 CoreFoundation 0x00007ff800436588 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 CoreFoundation 0x00007ff80042b83d ___forwarding___ + 1431
4 CoreFoundation 0x00007ff80042db38 _CF_forwarding_prep_0 + 120
5 IMCore 0x00007ff810903f11 IMCoreSimulatedEnvironmentEnabled + 155997
6 ChatKit 0x00000001098998c0 __46-[CKChatInputController _startEditingPayload:]_block_invoke + 591
7 ChatKit 0x00000001099f25ae __69+[CKComposition compositionWithShelfPluginPayload:completionHandler:]_block_invoke + 115
8 libdispatch.dylib 0x00007ff80013b7fb _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007ff80013ca3a _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007ff80014c32c _dispatch_main_queue_drain + 1338
11 libdispatch.dylib 0x00007ff80014bde4 _dispatch_main_queue_callback_4CF + 31
12 CoreFoundation 0x00007ff8003869f7 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
13 CoreFoundation 0x00007ff8003813c6 __CFRunLoopRun + 2482
14 CoreFoundation 0x00007ff800380637 CFRunLoopRunSpecific + 560
15 GraphicsServices 0x00007ff809c0f28a GSEventRunModal + 139
16 UIKitCore 0x00000001145c4425 -[UIApplication _run] + 994
17 UIKitCore 0x00000001145c9301 UIApplicationMain + 123
18 MobileSMS 0x0000000106198220 MobileSMS + 131616
19 dyld 0x00000001063ed2bf start_sim + 10
20 ??? 0x000000010d42a52e 0x0 + 4517438766
)
libc++abi: terminating with uncaught exception of type NSException

The error seems to be related to using the iPhone simulator, as I got it to work on a connected device without any errors.

Related

DeviceAgent-Runner quit unexpectedly

I made a simple Xamarin.iOS app with a UI Test App project just to learn how to make automated UI test. I am using VSMac 2019 and following the documentation here:
https://learn.microsoft.com/en-us/appcenter/test-cloud/frameworks/uitest/
I installed the Xamarin.TestCloud.Agent nugget in my iOS project and added in my FinishedLaunching method:
#if ENABLE_TEST_CLOUD
Xamarin.Calabash.Start();
#endif
My AppInitializer class in my UI Test App project:
public class AppInitializer
{
public static IApp StartApp(Platform platform)
{
// TODO: If the iOS or Android app being tested is included in the solution
// then open the Unit Tests window, right click Test Apps, select Add App Project
// and select the app projects that should be tested.
//
// The iOS project should have the Xamarin.TestCloud.Agent NuGet package
// installed. To start the Test Cloud Agent the following code should be
// added to the FinishedLaunching method of the AppDelegate:
//
// #if ENABLE_TEST_CLOUD
// Xamarin.Calabash.Start();
// #endif
if (platform == Platform.Android)
{
return ConfigureApp
.Android
// TODO: Update this path to point to your Android app and uncomment the
// code if the app is not included in the solution.
//.ApkFile ("../../../Droid/bin/Debug/xamarinforms.apk")
.StartApp();
}
return ConfigureApp.iOS
.EnableLocalScreenshots()
.DeviceIdentifier("3C0B5D32-8722-4A1C-BA6B-C13B3E3D3952")
.InstalledApp("com.drake.MyAppTest")
.StartApp();
}
}
It opens my simulator, installs the DeviceAgent app but then immediately crashes with this report:
------------------------------------- Translated Report (Full Report Below)
Incident Identifier: 42E3018F-F6AD-4A2D-BC85-F56CF5043C19
CrashReporter Key: CEC4770B-BEBD-CF8B-2D6A-E9045B038C60 Hardware
Model: MacBookPro16,1 Process: DeviceAgent-Runner
[81642] Path:
/Users/USER/Library/Developer/CoreSimulator/Devices/3C0B5D32-8722-4A1C-BA6B-C13B3E3D3952/data/Containers/Bundle/Application/96AEC496-0C00-46F8-82DD-53187D30D145/DeviceAgent-Runner.app/DeviceAgent-Runner Identifier: com.apple.test.DeviceAgent-Runner Version:
2.2.3 (1605115037) Code Type: X86-64 (Native) Role: Non UI Parent Process: launchd_sim [81025] Coalition:
com.apple.CoreSimulator.SimDevice.3C0B5D32-8722-4A1C-BA6B-C13B3E3D3952
[28614] Responsible Process: SimulatorTrampoline [1005]
Date/Time: 2023-01-10 16:15:23.1423 -0500 Launch Time:
2023-01-10 16:15:22.7223 -0500 OS Version: macOS 13.0.1
(22A400) Release Type: User Report Version: 104
Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000 Triggered by Thread: 0
Last Exception Backtrace: 0 CoreFoundation
0x7ff80042889b __exceptionPreprocess + 226 1 libobjc.A.dylib
0x7ff80004dba3 objc_exception_throw + 48 2 Foundation 0x7ff800b87271 -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0 3 XCTest
0x10ac8c700 _XCTestMain + 761 4 DeviceAgent-Runner
0x10a69702d -[_XCTRunnerAppDelegate applicationWillResignActive:] + 0
5 DeviceAgent-Runner 0x10a696f2b
_XCTRunnerRunTests + 0 6 CoreFoundation 0x7ff800387dd9 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 7
CoreFoundation 0x7ff800387592 __CFRunLoopDoBlocks
406 8 CoreFoundation 0x7ff800381e38 __CFRunLoopRun + 948 9 CoreFoundation 0x7ff8003816a7 CFRunLoopRunSpecific + 560 10 GraphicsServices
0x7ff809cb128a GSEventRunModal + 139 11 UIKitCore 0x111f20ad3 -[UIApplication _run] + 994 12 UIKitCore 0x111f259ef UIApplicationMain + 123 13 DeviceAgent-Runner 0x10a6971f5 main + 183 14 dyld_sim 0x10a84f2bf start_sim + 10 15 dyld
0x1167cb310 start + 2432
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0
libsystem_kernel.dylib 0x7ff83611d30e __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff836175f7b pthread_kill +
263 2 libsystem_c.dylib 0x7ff800132fe0 abort + 130
3 libc++abi.dylib 0x7ff800258742 abort_message +
241 4 libc++abi.dylib 0x7ff80024995d
demangling_terminate_handler() + 266 5 libobjc.A.dylib
0x7ff800032082 _objc_terminate() + 96 6 libc++abi.dylib 0x7ff800257b65 std::__terminate(void (*)()) + 8 7 libc++abi.dylib 0x7ff80025a3a4 __cxa_rethrow + 99 8
libobjc.A.dylib 0x7ff80004dd0d
objc_exception_rethrow + 37 9 CoreFoundation
0x7ff800381769 CFRunLoopRunSpecific + 754 10 GraphicsServices
0x7ff809cb128a GSEventRunModal + 139 11 UIKitCore 0x111f20ad3 -[UIApplication _run] + 994 12 UIKitCore 0x111f259ef UIApplicationMain + 123 13 DeviceAgent-Runner 0x10a6971f5 main + 183 14 dyld_sim 0x10a84f2bf start_sim + 10 15 dyld
0x1167cb310 start + 2432
Thread 1: 0 libsystem_pthread.dylib 0x7ff836171c58
start_wqthread + 0
Thread 2:: Dispatch queue: AXCodeLoader 0 CoreFoundation
0x7ff80036007e -[__NSCFString retain] + 5 1 AccessibilityUtilities 0x7ff809d43c4f -[AXCodeLoader
_accessibilityCodeItemMatchingName:type:path:] + 703 2 AccessibilityUtilities 0x7ff809d43f9e -[AXCodeLoader
_associateAccessibilityCodeItemWithLoadedCodeItem:] + 334 3 AccessibilityUtilities 0x7ff809d41b41 __36-[AXCodeLoader
_addTrackedCodeItem:]_block_invoke + 273 4 libdispatch.dylib 0x7ff80013b7fb _dispatch_call_block_and_release + 12 5 libdispatch.dylib 0x7ff80013ca3a
_dispatch_client_callout + 8 6 libdispatch.dylib 0x7ff800144346 _dispatch_lane_serial_drain + 949 7 libdispatch.dylib
0x7ff800144fe3 _dispatch_lane_invoke + 400 8 libdispatch.dylib 0x7ff800151b46 _dispatch_workloop_worker_thread + 870 9 libsystem_pthread.dylib 0x7ff836172ce3 _pthread_wqthread +
326 10 libsystem_pthread.dylib 0x7ff836171c67
start_wqthread + 15
Thread 3: 0 libsystem_pthread.dylib 0x7ff836171c58
start_wqthread + 0
Thread 4:: com.apple.uikit.eventfetch-thread 0
libsystem_kernel.dylib 0x7ff8361166a2 mach_msg2_trap + 10
1 libsystem_kernel.dylib 0x7ff83612467d
mach_msg2_internal + 82 2 libsystem_kernel.dylib
0x7ff83611d71a mach_msg_overwrite + 723 3 libsystem_kernel.dylib
0x7ff836116989 mach_msg + 19 4 CoreFoundation 0x7ff80038788e __CFRunLoopServiceMachPort + 145 5 CoreFoundation
0x7ff800381fdf __CFRunLoopRun + 1371 6 CoreFoundation 0x7ff8003816a7 CFRunLoopRunSpecific + 560 7 Foundation 0x7ff800c568b4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213 8 Foundation 0x7ff800c56b2d
-[NSRunLoop(NSRunLoop) runUntilDate:] + 72 9 UIKitCore 0x111ff6286 -[UIEventFetcher threadMain] + 535 10 Foundation 0x7ff800c8011b NSThread__start + 1009 11 libsystem_pthread.dylib 0x7ff836176259 _pthread_start + 125
12 libsystem_pthread.dylib 0x7ff836171c7b thread_start +
15
Thread 5: 0 libsystem_pthread.dylib 0x7ff836171c58
start_wqthread + 0
Thread 6: 0 libsystem_pthread.dylib 0x7ff836171c58
start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit): rax:
0x0000000000000000 rbx: 0x00000001168692c0 rcx: 0x00007ff7b5868748
rdx: 0x0000000000000000 rdi: 0x0000000000000103 rsi:
0x0000000000000006 rbp: 0x00007ff7b5868770 rsp: 0x00007ff7b5868748
r8: 0x00007ff7b5868610 r9: 0x00007ff7b5868870 r10:
0x0000000000000000 r11: 0x0000000000000246 r12: 0x0000000000000103
r13: 0x0000003000000008 r14: 0x0000000000000006 r15:
0x0000000000000016 rip: 0x00007ff83611d30e rfl: 0x0000000000000246
cr2: 0x00007ff800132f5e Logical CPU: 0 Error Code:
0x02000148 Trap Number: 133
Binary Images:
0x7ff836115000 - 0x7ff83614eff7 libsystem_kernel.dylib () <0c2fd2c9-777c-3355-b70f-7b1b6e9d1b0b>
/usr/lib/system/libsystem_kernel.dylib
0x7ff836170000 - 0x7ff83617bff7 libsystem_pthread.dylib () <13b5e252-77d1-31e1-888d-1c5f4426ea87>
/usr/lib/system/libsystem_pthread.dylib
0x7ff8000b5000 - 0x7ff800139ff7 libsystem_c.dylib () <8a60f5c1-ea1f-352b-b778-967be44e3677>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib
0x7ff800248000 - 0x7ff80025dffb libc++abi.dylib ()
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib
0x7ff80002c000 - 0x7ff80005ffe9 libobjc.A.dylib () <2a7a213a-fdb2-311c-81d7-efdfd9ddf25a>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib
0x7ff800303000 - 0x7ff80068bffc com.apple.CoreFoundation (6.9) <2be0f79f-8b25-3614-9e7e-dbac565f72dd>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x7ff809cae000 - 0x7ff809cb5ff2 com.apple.GraphicsServices (1.0) <16365e42-1d5c-363d-84d1-3bb290a43253>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1110df000 - 0x112baafff com.apple.UIKitCore (1.0)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x10a695000 - 0x10a69afff com.apple.test.DeviceAgent-Runner (2.2.3)
<21a4d4bc-72d4-3a0e-9786-17e33f61a799>
/Users/USER/Library/Developer/CoreSimulator/Devices/3C0B5D32-8722-4A1C-BA6B-C13B3E3D3952/data/Containers/Bundle/Application/96AEC496-0C00-46F8-82DD-53187D30D145/DeviceAgent-Runner.app/DeviceAgent-Runner
0x10a84d000 - 0x10a8acfff dyld_sim () <6fb74554-3370-3677-93d4-7f7a01ea6a80>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
0x1167c5000 - 0x11685cfff dyld () <28fd2071-57f3-3873-87bf-e4f674a82de6> /usr/lib/dyld
0x7ff809cb6000 - 0x7ff809e5dff1 com.apple.AccessibilityUtilities (1.0.0)
<50cb8d29-b910-3d47-9032-8587768224fa>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities
0x7ff80013a000 - 0x7ff800185ff3 libdispatch.dylib () <59be51c1-e9f3-3a60-8108-cd70ae082897>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib
0x7ff8006fe000 - 0x7ff80102eff4 com.apple.Foundation (6.9) <86cd050d-44fc-3045-a1f3-8ad5047b329e>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
0x10ac01000 - 0x10acf5fff com.apple.dt.XCTest (1.0)
/Users/USER/Library/Developer/CoreSimulator/Devices/3C0B5D32-8722-4A1C-BA6B-C13B3E3D3952/data/Containers/Bundle/Application/96AEC496-0C00-46F8-82DD-53187D30D145/DeviceAgent-Runner.app/Frameworks/XCTest.framework/XCTest
EOF
----------- Full Report
{"app_name":"DeviceAgent-Runner","timestamp":"2023-01-10 16:15:23.00
-0500","app_version":"2.2.3","slice_uuid":"21a4d4bc-72d4-3a0e-9786-17e33f61a799","build_version":"1605115037","platform":7,"bundleID":"com.apple.test.DeviceAgent-Runner","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS
13.0.1 (22A400)","roots_installed":0,"name":"DeviceAgent-Runner","incident_id":"42E3018F-F6AD-4A2D-BC85-F56CF5043C19"}
{ "uptime" : 310000, "procRole" : "Non UI", "version" : 2,
"userID" : 501, "deployVersion" : 210, "modelCode" :
"MacBookPro16,1", "coalitionID" : 28614, "osVersion" : {
"train" : "macOS 13.0.1",
"build" : "22A400",
"releaseType" : "User" }, "captureTime" : "2023-01-10 16:15:23.1423 -0500", "incident" :
"42E3018F-F6AD-4A2D-BC85-F56CF5043C19", "pid" : 81642, "cpuType" :
"X86-64", "roots_installed" : 0, "bug_type" : "309",
"procLaunch" : "2023-01-10 16:15:22.7223 -0500", "procStartAbsTime"
: 317186299226018, "procExitAbsTime" : 317186718671602, "procName"
: "DeviceAgent-Runner", "procPath" :
"/Users/USER/Library/Developer/CoreSimulator/Devices/3C0B5D32-8722-4A1C-BA6B-C13B3E3D3952/data/Containers/Bundle/Application/96AEC496-0C00-46F8-82DD-53187D30D145/DeviceAgent-Runner.app/DeviceAgent-Runner",
"bundleInfo" :
{"CFBundleShortVersionString":"2.2.3","CFBundleVersion":"1605115037","CFBundleIdentifier":"com.apple.test.DeviceAgent-Runner"},
"storeInfo" :
{"deviceIdentifierForVendor":"37FA7600-3C07-5A77-BDA0-2BC56C48EE9E","thirdParty":true},
"parentProc" : "launchd_sim", "parentPid" : 81025, "coalitionName"
:
"com.apple.CoreSimulator.SimDevice.3C0B5D32-8722-4A1C-BA6B-C13B3E3D3952",
"crashReporterKey" : "CEC4770B-BEBD-CF8B-2D6A-E9045B038C60",
"responsiblePid" : 1005, "responsibleProc" : "SimulatorTrampoline",
"wakeTime" : 2282, "bridgeVersion" :
{"build":"20P420","train":"7.0"}, "sleepWakeUUID" :
"0F2539EC-DDFE-4381-82F1-C578B4701148", "sip" : "enabled",
"exception" : {"codes":"0x0000000000000000,
0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"asiBacktraces" : ["0 CoreFoundation
0x00007ff8004288ab __exceptionPreprocess + 242\n1 libobjc.A.dylib
0x00007ff80004dba3 objc_exception_throw + 48\n2 Foundation
0x00007ff800b87271 -[NSMutableDictionary(NSMutableDictionary)
classForCoder] + 0\n3 XCTest
0x000000010ac8c700 _XCTestMain + 761\n4 DeviceAgent-Runner
0x000000010a69702d -[_XCTRunnerAppDelegate
applicationWillResignActive:] + 0\n5 DeviceAgent-Runner
0x000000010a696f2b _XCTRunnerRunTests + 0\n6 CoreFoundation
0x00007ff800387dd9 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12\n7
CoreFoundation 0x00007ff800387592
__CFRunLoopDoBlocks + 406\n8 CoreFoundation 0x00007ff800381e38 __CFRunLoopRun + 948\n9 CoreFoundation
0x00007ff8003816a7 CFRunLoopRunSpecific + 560\n10 GraphicsServices
0x00007ff809cb128a GSEventRunModal + 139\n11 UIKitCore
0x0000000111f20ad3 -[UIApplication _run] + 994\n12 UIKitCore
0x0000000111f259ef UIApplicationMain + 123\n13 DeviceAgent-Runner
0x000000010a6971f5 main + 183\n14 dyld
0x000000010a84f2bf start_sim + 10\n15 ???
0x00000001167cb310 0x0 + 4672238352"], "extMods" :
{"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":18},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"lastExceptionBacktrace" :
[{"imageOffset":1202331,"symbol":"__exceptionPreprocess","symbolLocation":226,"imageIndex":5},{"imageOffset":138147,"symbol":"objc_exception_throw","symbolLocation":48,"imageIndex":4},{"imageOffset":4756081,"symbol":"-[NSMutableDictionary(NSMutableDictionary)
classForCoder]","symbolLocation":0,"imageIndex":13},{"imageOffset":571136,"symbol":"_XCTestMain","symbolLocation":761,"imageIndex":14},{"imageOffset":8237,"symbol":"-[_XCTRunnerAppDelegate
applicationWillResignActive:]","symbolLocation":0,"imageIndex":8},{"imageOffset":7979,"symbol":"_XCTRunnerRunTests","symbolLocation":0,"imageIndex":8},{"imageOffset":544217,"symbol":"CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK","symbolLocation":12,"imageIndex":5},{"imageOffset":542098,"symbol":"__CFRunLoopDoBlocks","symbolLocation":406,"imageIndex":5},{"imageOffset":519736,"symbol":"__CFRunLoopRun","symbolLocation":948,"imageIndex":5},{"imageOffset":517799,"symbol":"CFRunLoopRunSpecific","symbolLocation":560,"imageIndex":5},{"imageOffset":12938,"symbol":"GSEventRunModal","symbolLocation":139,"imageIndex":6},{"imageOffset":14949075,"symbol":"-[UIApplication
_run]","symbolLocation":994,"imageIndex":7},{"imageOffset":14969327,"symbol":"UIApplicationMain","symbolLocation":123,"imageIndex":7},{"imageOffset":8693,"symbol":"main","symbolLocation":183,"imageIndex":8},{"imageOffset":8895,"symbol":"start_sim","symbolLocation":10,"imageIndex":9},{"imageOffset":25360,"symbol":"start","symbolLocation":2432,"imageIndex":10}],
"faultingThread" : 0, "threads" :
[{"triggered":true,"id":3080438,"threadState":{"r13":{"value":206158430216},"rax":{"value":0},"rflags":{"value":582},"cpu":{"value":0},"r14":{"value":6},"rsi":{"value":6},"r8":{"value":140701879141904},"cr2":{"value":140703129874270},"rdx":{"value":0},"r10":{"value":0},"r9":{"value":140701879142512},"r15":{"value":22},"rbx":{"value":4672885440,"symbolLocation":0,"symbol":"_main_thread"},"trap":{"value":133},"err":{"value":33554760},"r11":{"value":582},"rip":{"value":140704035754766,"matchesCrashFrame":1},"rbp":{"value":140701879142256},"rsp":{"value":140701879142216},"r12":{"value":259},"rcx":{"value":140701879142216},"flavor":"x86_THREAD_STATE","rdi":{"value":259}},"queue":"com.apple.main-thread","frames":[{"imageOffset":33550,"symbol":"__pthread_kill","symbolLocation":10,"imageIndex":0},{"imageOffset":24443,"symbol":"pthread_kill","symbolLocation":263,"imageIndex":1},{"imageOffset":516064,"symbol":"abort","symbolLocation":130,"imageIndex":2},{"imageOffset":67394,"symbol":"abort_message","symbolLocation":241,"imageIndex":3},{"imageOffset":6493,"symbol":"demangling_terminate_handler()","symbolLocation":266,"imageIndex":3},{"imageOffset":24706,"symbol":"_objc_terminate()","symbolLocation":96,"imageIndex":4},{"imageOffset":64357,"symbol":"std::__terminate(void
(*)())","symbolLocation":8,"imageIndex":3},{"imageOffset":74660,"symbol":"__cxa_rethrow","symbolLocation":99,"imageIndex":3},{"imageOffset":138509,"symbol":"objc_exception_rethrow","symbolLocation":37,"imageIndex":4},{"imageOffset":517993,"symbol":"CFRunLoopRunSpecific","symbolLocation":754,"imageIndex":5},{"imageOffset":12938,"symbol":"GSEventRunModal","symbolLocation":139,"imageIndex":6},{"imageOffset":14949075,"symbol":"-[UIApplication
_run]","symbolLocation":994,"imageIndex":7},{"imageOffset":14969327,"symbol":"UIApplicationMain","symbolLocation":123,"imageIndex":7},{"imageOffset":8693,"symbol":"main","symbolLocation":183,"imageIndex":8},{"imageOffset":8895,"symbol":"start_sim","symbolLocation":10,"imageIndex":9},{"imageOffset":25360,"symbol":"start","symbolLocation":2432,"imageIndex":10}]},{"id":3080469,"frames":[{"imageOffset":7256,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":3080470,"queue":"AXCodeLoader","frames":[{"imageOffset":381054,"symbol":"-[__NSCFString
retain]","symbolLocation":5,"imageIndex":5},{"imageOffset":580687,"symbol":"-[AXCodeLoader
_accessibilityCodeItemMatchingName:type:path:]","symbolLocation":703,"imageIndex":11},{"imageOffset":581534,"symbol":"-[AXCodeLoader
_associateAccessibilityCodeItemWithLoadedCodeItem:]","symbolLocation":334,"imageIndex":11},{"imageOffset":572225,"symbol":"__36-[AXCodeLoader
_addTrackedCodeItem:]_block_invoke","symbolLocation":273,"imageIndex":11},{"imageOffset":6139,"symbol":"_dispatch_call_block_and_release","symbolLocation":12,"imageIndex":12},{"imageOffset":10810,"symbol":"_dispatch_client_callout","symbolLocation":8,"imageIndex":12},{"imageOffset":41798,"symbol":"_dispatch_lane_serial_drain","symbolLocation":949,"imageIndex":12},{"imageOffset":45027,"symbol":"_dispatch_lane_invoke","symbolLocation":400,"imageIndex":12},{"imageOffset":97094,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":870,"imageIndex":12},{"imageOffset":11491,"symbol":"_pthread_wqthread","symbolLocation":326,"imageIndex":1},{"imageOffset":7271,"symbol":"start_wqthread","symbolLocation":15,"imageIndex":1}]},{"id":3080471,"frames":[{"imageOffset":7256,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":3080472,"name":"com.apple.uikit.eventfetch-thread","frames":[{"imageOffset":5794,"symbol":"mach_msg2_trap","symbolLocation":10,"imageIndex":0},{"imageOffset":63101,"symbol":"mach_msg2_internal","symbolLocation":82,"imageIndex":0},{"imageOffset":34586,"symbol":"mach_msg_overwrite","symbolLocation":723,"imageIndex":0},{"imageOffset":6537,"symbol":"mach_msg","symbolLocation":19,"imageIndex":0},{"imageOffset":542862,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":145,"imageIndex":5},{"imageOffset":520159,"symbol":"__CFRunLoopRun","symbolLocation":1371,"imageIndex":5},{"imageOffset":517799,"symbol":"CFRunLoopRunSpecific","symbolLocation":560,"imageIndex":5},{"imageOffset":5605556,"symbol":"-[NSRunLoop(NSRunLoop)
runMode:beforeDate:]","symbolLocation":213,"imageIndex":13},{"imageOffset":5606189,"symbol":"-[NSRunLoop(NSRunLoop)
runUntilDate:]","symbolLocation":72,"imageIndex":13},{"imageOffset":15823494,"symbol":"-[UIEventFetcher
threadMain]","symbolLocation":535,"imageIndex":7},{"imageOffset":5775643,"symbol":"NSThread__start","symbolLocation":1009,"imageIndex":13},{"imageOffset":25177,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":1},{"imageOffset":7291,"symbol":"thread_start","symbolLocation":15,"imageIndex":1}]},{"id":3080473,"frames":[{"imageOffset":7256,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":3080474,"frames":[{"imageOffset":7256,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]}],
"usedImages" : [ {
"source" : "P",
"arch" : "x86_64",
"base" : 140704035721216,
"size" : 237560,
"uuid" : "0c2fd2c9-777c-3355-b70f-7b1b6e9d1b0b",
"path" : "/usr/lib/system/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib" }, {
"source" : "P",
"arch" : "x86_64",
"base" : 140704036093952,
"size" : 49144,
"uuid" : "13b5e252-77d1-31e1-888d-1c5f4426ea87",
"path" : "/usr/lib/system/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib" }, {
"source" : "P",
"arch" : "x86_64",
"base" : 140703129358336,
"size" : 544760,
"uuid" : "8a60f5c1-ea1f-352b-b778-967be44e3677",
"path" : "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib",
"name" : "libsystem_c.dylib" }, {
"source" : "P",
"arch" : "x86_64",
"base" : 140703131009024,
"size" : 90108,
"uuid" : "ae8cbd53-0926-3251-b648-6f32d9330a50",
"path" : "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib",
"name" : "libc++abi.dylib" }, {
"source" : "P",
"arch" : "x86_64",
"base" : 140703128797184,
"size" : 212970,
"uuid" : "2a7a213a-fdb2-311c-81d7-efdfd9ddf25a",
"path" : "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib",
"name" : "libobjc.A.dylib" }, {
"source" : "P",
"arch" : "x86_64",
"base" : 140703131774976,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.CoreFoundation",
"size" : 3706877,
"uuid" : "2be0f79f-8b25-3614-9e7e-dbac565f72dd",
"path" : "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation",
EDIT
I noticed in the logs of the test result window:
023-01-10 21:04:33.843 DeviceAgent-Runner[90901:3282302] Running
tests... 2023-01-10 21:04:33.845 DeviceAgent-Runner[90901:3282302]
Unable to load configuration data from specified path ; error: The
file name is invalid. 2023-01-10 21:04:33.845
DeviceAgent-Runner[90901:3282302] Unable to load configuration data
from specified path ; error: The file name is invalid. 2023-01-10
21:04:33.848 DeviceAgent-Runner[90901:3282302] Found most recent test
bundle at NSBundle
</Users/drake/Library/Developer/CoreSimulator/Devices/B7B33614-1706-4361-8A0F-EE12175686CC/data/Containers/Bundle/Application/8CD92CE7-5550-4E8A-99B8-BCC0DD6147F9/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest>
(not yet loaded) 2023-01-10 21:04:33.848
DeviceAgent-Runner[90901:3282302] Found most recent test configuration
in bundle:
/Users/drake/Library/Developer/CoreSimulator/Devices/B7B33614-1706-4361-8A0F-EE12175686CC/data/Containers/Bundle/Application/8CD92CE7-5550-4E8A-99B8-BCC0DD6147F9/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/CBX.xctestconfiguration
2023-01-10 21:04:33.850 DeviceAgent-Runner[90901:3282302] clearing out
IDE related attributes 2023-01-10 21:04:33.850
DeviceAgent-Runner[90901:3282302] Running with configuration
<XCTestConfiguration: 0x600000a245b0> 2023-01-10 21:04:33.854
DeviceAgent-Runner[90901:3282302] *** Assertion failure in void
_XCTestMain(XCTestConfiguration *__strong _Nonnull)(), /Library/Caches/com.apple.xbs/Sources/XCTest_Sim/XCTest-14460.20/Sources/XCTestFramework/Harness/XCTestMain.m:213
2023-01-10 21:04:33.856 DeviceAgent-Runner[90901:3282302] ***
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'No test bundle found at
file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest'
2023-01-10 21:04:34.158 xcodebuild[90891:3282023] [MT]
IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2023-01-10 21:04:34.158 xcodebuild[90891:3282023] [MT]
IDETestOperationsObserverDebug: 1.940 elapsed -- Testing started
completed. 2023-01-10 21:04:34.158 xcodebuild[90891:3282023] [MT]
IDETestOperationsObserverDebug: 1.940 sec, +1.940 sec -- end
2023-01-10 21:04:34.217 xcodebuild[90891:3282023] [MT] IDEResultKit:
Warning: While writing a result bundle to
/var/folders/jn/t9rq3scj2v13v8cmvl7kw2h80000gn/T/xdb/logs/2023.01.10.210431/DerivedData/Logs/Test/Test-Transient
Testing-2023.01.10_21-04-32--0500.xcresult, not all contents have been
imported, as the Staging directory still contains the following
files/directories: ["1_Test"]
Do I need to include a path to a configuration somewhere?
EDIT 2
I notice there is no reference to Xamarin.Calabash if I remove the #if ENABLE_TEST_CLOUD. Is there another package I need to add to my project?
Check the location of UITest.xctest. The error message in your edit indicates there is no test bundle.
No test bundle found at file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest

unrecognised selector sent to instance when attaching GLFW Cocoa Window to IPlugView (VST3SDK)

I'm doing some work with the Steinberg VST3SDK and have bumped into an error I don't really understand:
[GLFWWindow window]: unrecognized selector sent to instance 0x7fe10430a830
2022-12-22 08:11:08.981 MyHost[1593:20791] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GLFWWindow window]: unrecognized selector sent to instance 0x7fe10430a830'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff37903a17 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff70468a9e objc_exception_throw + 48
2 CoreFoundation 0x00007fff37982e36 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff37868190 ___forwarding___ + 1427
4 CoreFoundation 0x00007fff37867b68 _CF_forwarding_prep_0 + 120
5 Digitalis 0x000000010a9dc990 GetPluginFactory + 1922288
6 Digitalis 0x000000010a9dbb85 GetPluginFactory + 1918693
7 Digitalis 0x000000010a80db6e GetPluginFactory + 26318
8 MyHost 0x000000010a624641 _ZN6Plugin4loadERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 2065
9 MyHost 0x000000010a624e9d main + 61
10 libdyld.dylib 0x00007fff71608cc9 start + 1
11 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
i guess this leads me to question whether the kPlatformType “NSView” is equivalent to glfwGetCocoaWindow()'s “NSWindow” return value?
heres the snippet of code thats causing me errors:
if (!glfwInit()) {
std::cout << "Failed to initialise Editor Window" << std::endl;
return false;
}
auto view = controller->createView(Steinberg::Vst::ViewType::kEditor);
Steinberg::ViewRect dimensions;
view->getSize(&dimensions);
editorWindow = glfwCreateWindow(dimensions.getWidth(), dimensions.getHeight(), "VST 3 SDK", nullptr, nullptr);
view->attached(glfwGetCocoaWindow(editorWindow), Steinberg::kPlatformTypeNSView);
can also confirm that the windows equivalent of this works fine:
view->attached(glfwGetWin32Window(editorWindow), Steinberg::kPlatformTypeHWN
any type of explanation whether it be for debugging the error message itself or the VST3SDK side would be greatly appreciated!
i tried:
view->attached(glfwGetCocoaWindow(editorWindow), Steinberg::kPlatformTypeNSView);
and expected the vst3 view to be attached to my GLFW window

Error when running my ios sumilator : Exception '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]

I have just done some configs in Xcode and appdelegate.m for RNFirebase, RNFBSDK, and google Sign-In. After following al the steps I have an error when running my ios simulator with react-native run ios.
I have tried to tweak the AppDelegate.m, I deleted my build folders and recompiled
My AppDelegate.m file looks like this
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>
#import <RNGoogleSignin/RNGoogleSignin.h>
#import <Firebase.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Firebase configurations
[FIRApp configure];
// Facebook SDK
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:#"index" fallbackResource:nil];
[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
return YES;
}
// RNGoogleSignin.h -> https://github.com/react-native-community/react-native-google-signin/blob/master/docs/ios-guide.md#modify-your-app-to-respond-to-the-url-scheme-optional
- (BOOL)application:(UIApplication *)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<NSString *,id> *)options {
return [RNGoogleSignin application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
}
// FACEBOOK SDK
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
];
// Add any custom logic here.
return handled;
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppEvents activateApp];
}
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
return YES;
}
if ([RCTLinkingManager application:app openURL:url options:options]) {
return YES;
}
return NO;
}
#end
this is the entire error popping on the simulator screen instead of the app launching:
Exception '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' was thrown while invoking getImageForFont on target RNVectorIconsManager with params (
Entypo,
"\Uf241",
30,
4278190080,
35
)
callstack: (
0 CoreFoundation 0x0000000111f926fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000011097eac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000111ee0ddc _CFThrowFormattedException + 194
3 CoreFoundation 0x0000000111ffec31 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 321
4 CoreFoundation 0x0000000111f8e3db +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
5 madilist_app 0x000000010d8339bf -[RNVectorIconsManager createAndSaveGlyphImage:withFont:withFilePath:withColor:] + 415
6 madilist_app 0x000000010d833d68 -[RNVectorIconsManager getImageForFont:withGlyph:withFontSize:withColor:callback:] + 360
7 CoreFoundation 0x0000000111f994cc __invoking___ + 140
8 CoreFoundation 0x0000000111f96a45 -[NSInvocation invoke] + 325
9 CoreFoundation 0x0000000111f96e96 -[NSInvocation invokeWithTarget:] + 54
10 madilist_app 0x000000010d528fba -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2810
11 madilist_app 0x000000010d5db096 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 790
12 madilist_app 0x000000010d5daba3 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 131
13 madilist_app 0x000000010d5dab19 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25
14 libdispatch.dylib 0x000000011497accf _dispatch_call_block_and_release + 12
15 libdispatch.dylib 0x000000011497bd02 _dispatch_client_callout + 8
16 libdispatch.dylib 0x0000000114982720 _dispatch_lane_serial_drain + 705
17 libdispatch.dylib 0x0000000114983261 _dispatch_lane_invoke + 398
18 libdispatch.dylib 0x000000011498bfcb _dispatch_workloop_worker_thread + 645
19 libsystem_pthread.dylib 0x0000000114d5d611 _pthread_wqthread + 421
20 libsystem_pthread.dylib 0x0000000114d5d3fd start_wqthread + 13
)
RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread

Swift + Parse: 'Can't use nil for keys or values on PFObject. Use NSNull for values.'

So I have a Swift application that I am working on (in Xcode 7.3).
It uses Parse and in it I have a function that is generating the error message stated in the title.
The code appears as follows;
#IBAction func callUber(sender: AnyObject) {
let riderRequest = PFObject(className:"riderRequest")
riderRequest["username"] = PFUser.currentUser()?.username
riderRequest["location "] = PFGeoPoint(latitude:latitude, longitude:longitude)
riderRequest.saveInBackgroundWithBlock {
(success: Bool, error: NSError?) -> Void in
if (success) {
self.callUberButton.setTitle("Cancel Uber", forState: UIControlState.Normal)
} else {
let alert = UIAlertController(title: "Could not call Uber", message: "Please try again", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
}
}
}
Now somewhere in this code nil is being applied to a value, and this causes the error message (or so I think). I have been looking around on SO for solutions to this problem, however I could not find any similar threads for this error message and Swift, only Objective-C.
I'm guessing that I have to introduce some sort of error handling or check where I make sure that the value of the object is not nil, however I cant seem to figure out where, or how to apply this.
The error is only triggered when I press the "callUber" button, and the full output from the debug console follows below.
2016-04-15 12:21:01.900 ParseStarterProject-Swift[8781:2591354] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't use nil for keys or values on PFObject. Use NSNull for values.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ca98d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010eca0deb objc_exception_throw + 48
2 CoreFoundation 0x000000010ca98cbd +[NSException raise:format:] + 205
3 ParseStarterProject-Swift 0x000000010c1042a8 -[PFObject(Private) _setObject:forKey:onlyIfDifferent:] + 122
4 ParseStarterProject-Swift 0x000000010c107d01 -[PFObject setObject:forKey:] + 53
5 ParseStarterProject-Swift 0x000000010c107d46 -[PFObject setObject:forKeyedSubscript:] + 50
6 ParseStarterProject-Swift 0x000000010c0c847f _TFC25ParseStarterProject_Swift19RiderViewController8callUberfPs9AnyObject_T_ + 671
7 ParseStarterProject-Swift 0x000000010c0c89d6 _TToFC25ParseStarterProject_Swift19RiderViewController8callUberfPs9AnyObject_T_ + 54
8 UIKit 0x000000010d726a8d -[UIApplication sendAction:to:from:forEvent:] + 92
9 UIKit 0x000000010d899e67 -[UIControl sendAction:to:forEvent:] + 67
10 UIKit 0x000000010d89a143 -[UIControl _sendActionsForEvents:withEvent:] + 327
11 UIKit 0x000000010d899263 -[UIControl touchesEnded:withEvent:] + 601
12 UIKit 0x000000010d79999f -[UIWindow _sendTouchesForEvent:] + 835
13 UIKit 0x000000010d79a6d4 -[UIWindow sendEvent:] + 865
14 UIKit 0x000000010d745dc6 -[UIApplication sendEvent:] + 263
15 UIKit 0x000000011dfe0b15 -[UIApplicationAccessibility sendEvent:] + 77
16 UIKit 0x000000010d71f553 _UIApplicationHandleEventQueue + 6660
17 CoreFoundation 0x000000010c9be301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18 CoreFoundation 0x000000010c9b422c __CFRunLoopDoSources0 + 556
19 CoreFoundation 0x000000010c9b36e3 __CFRunLoopRun + 867
20 CoreFoundation 0x000000010c9b30f8 CFRunLoopRunSpecific + 488
21 GraphicsServices 0x0000000111eb0ad2 GSEventRunModal + 161
22 UIKit 0x000000010d724f09 UIApplicationMain + 171
23 ParseStarterProject-Swift 0x000000010c0cc712 main + 114
24 libdyld.dylib 0x000000010f7a792d start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
A couple of things that may be the issue:
Double check your class name is "riderRequest", I think "RiderRequest" could possibly be the actual name.
Second is to check all your key names are correct by going to the parse dashboard and having a look at your class
Last thing is to confirm that all your values for things like username and latitude and longitude are not nil before setting them.
Maybe try:
if let username = PFUser.currentUser()?.username && latitude != nil && longitude != nil {
riderRequest.setObject(username, forKey: "username")
riderRequest.setObject(PFGeoPoint(latitude: latitude, longitude: longitude), forKey: "location")
//then run the rest of the code as you have been
}

nearby places swift 2 error

I work on a ios application that requires to use nearby places api from google. It worked very well with swift but now , when i updated my xcode to xcode 7 and it changed from swift to swift 2 it doesn't work anymore. I am stuck with this , any help will be apreciated .
Here is the request for the api :
func fetchPlacesNearCoordinate(coordinate: CLLocationCoordinate2D, radius: Double, name : String){
var urlString = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=\(44.942149),\(26.02453)&radius=\(radius)&types=food"
urlString += "&key=\(apiServerKey)"
urlString = urlString.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)!
if placesTask.taskIdentifier > 0 && placesTask.state == .Running {
placesTask.cancel()
}
UIApplication.sharedApplication().networkActivityIndicatorVisible = true
do{
//******************Here's the line that displays error
placesTask = session.dataTaskWithURL(NSURL(string: urlString)!) {
(data, response, error) -> Void in
UIApplication.sharedApplication().networkActivityIndicatorVisible = false
//var placesArray = [GooglePlace]()
do {
if let json = try NSJSONSerialization.JSONObjectWithData(data!, options:[]) as? NSDictionary {
if let results = json["results"] as? NSArray {
for rawPlace:AnyObject in results {
print(rawPlace)
var placename = ""
if let name = rawPlace["name"] as? NSString {
placename = name as String
}
}
}
}
} catch {
//handle error
}
/*dispatch_async(dispatch_get_main_queue()) {
completion(placesArray)
}*/
}
}catch{
}
placesTask.resume()
}
And the errors i get :
2015-10-02 16:57:54.586 QR Code[4331:67414] -[NSURLSessionDataTask taskIdentifier]: unrecognized selector sent to instance 0x7fe791c3b840
2015-10-02 16:57:54.591 QR Code[4331:67414] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLSessionDataTask taskIdentifier]: unrecognized selector sent to instance 0x7fe791c3b840'
*** First throw call stack:(
0 CoreFoundation 0x0000000111a8ef65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111506deb objc_exception_throw + 48
2 CoreFoundation 0x0000000111a9758d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001119e4f7a ___forwarding___ + 970
4 CoreFoundation 0x00000001119e4b28 _CF_forwarding_prep_0 + 120
5 QR Code 0x000000010f57b3ff _TFC7QR_Code17MapViewController25fetchPlacesNearCoordinatefS0_FTVSC22CLLocationCoordinate2D6radiusSd4nameSS_T_ + 1215
6 QR Code 0x000000010f57bfd3 _TFC7QR_Code17MapViewController11viewDidLoadfS0_FT_T_ + 1555
7 QR Code 0x000000010f57c552 _TToFC7QR_Code17MapViewController11viewDidLoadfS0_FT_T_ + 34
8 UIKit 0x00000001122ae931 -[UIViewController loadViewIfRequired] + 1344
9 UIKit 0x00000001122b4923 -[UIViewController __viewWillAppear:] + 120
10 UIKit 0x00000001122e418a -[UINavigationController _startCustomTransition:] + 1177
11 UIKit 0x00000001122f37c7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
12 UIKit 0x00000001122f467d -[UINavigationController __viewWillLayoutSubviews] + 57
13 UIKit 0x000000011248c63d -[UILayoutContainerView layoutSubviews] + 248
14 UIKit 0x00000001121d411c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
15 QuartzCore 0x000000010fe7536a -[CALayer layoutSublayers] + 146
16 QuartzCore 0x000000010fe69bd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
17 QuartzCore 0x000000010fe69a4e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
18 QuartzCore 0x000000010fe5e1d5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
19 QuartzCore 0x000000010fe8b9f0 _ZN2CA11Transaction6commitEv + 508
20 UIKit 0x000000011211e1b6 _UIApplicationHandleEventQueue + 7183
21 CoreFoundation 0x00000001119bb0a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22 CoreFoundation 0x00000001119b0fcc __CFRunLoopDoSources0 + 556
23 CoreFoundation 0x00000001119b0483 __CFRunLoopRun + 867
24 CoreFoundation 0x00000001119afe98 CFRunLoopRunSpecific + 488
25 GraphicsServices 0x0000000115770ad2 GSEventRunModal + 161
26 UIKit 0x0000000112123676 UIApplicationMain + 171
27 QR Code 0x000000010f5782bd main + 109
28 libdyld.dylib 0x0000000113dd192d start + 1)
libc++abi.dylib: terminating with uncaught exception of type NSException
Please do not call the Places API Web Services directly from a mobile device - it opens up the potential for external parties to steal your API key from your application. Please follow the Proxy Server pattern laid out in this tutorial by Ray Wenderlich's team.

Resources