I'm learning Xcode development through apple's work book I got to lesson 1.9.
on Xcode I build an outlet that when the user clicks on its text changes.
this is what supposed to happen but when I excute the code I get this runtime error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[interfaceBuilderBasics.ViewController pressButton:]: unrecognized selector sent to instance 0x104209070'
*** First throw call stack:
(
0 CoreFoundation 0x00000001804658a8 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018005c09c objc_exception_throw + 56
2 CoreFoundation 0x000000018047a6f8 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 UIKitCore 0x0000000109c473d4 -[UIResponder doesNotRecognizeSelector:] + 232
4 CoreFoundation 0x00000001804699f8 forwarding + 1280
5 CoreFoundation 0x000000018046bd1c _CF_forwarding_prep_0 + 92
6 UIKitCore 0x0000000109c20e90 -[UIApplication sendAction:to:from:forEvent:] + 96
7 UIKitCore 0x00000001095469d4 -[UIControl sendAction:to:forEvent:] + 108
8 UIKitCore 0x0000000109546d18 -[UIControl _sendActionsForEvents:withEvent:] + 268
9 UIKitCore 0x0000000109543858 -[UIButton _sendActionsForEvents:withEvent:] + 120
10 UIKitCore 0x0000000109545a54 -[UIControl touchesEnded:withEvent:] + 392
11 UIKitCore 0x0000000109c5452c -[UIWindow _sendTouchesForEvent:] + 900
12 UIKitCore 0x0000000109c55a10 -[UIWindow sendEvent:] + 3104
13 UIKitCore 0x0000000109c3568c -[UIApplication sendEvent:] + 576
14 UIKitCore 0x0000000109cb5014 __dispatchPreprocessedEventFromEventQueue + 1708
15 UIKitCore 0x0000000109cb7ec4 __processEventQueue + 5520
16 UIKitCore 0x0000000109cb0f58 __eventFetcherSourceCallback + 156
17 CoreFoundation 0x00000001803c669c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
18 CoreFoundation 0x00000001803c65e4 __CFRunLoopDoSource0 + 172
19 CoreFoundation 0x00000001803c5d54 __CFRunLoopDoSources0 + 232
20 CoreFoundation 0x00000001803c043c __CFRunLoopRun + 768
21 CoreFoundation 0x00000001803bfd28 CFRunLoopRunSpecific + 572
22 GraphicsServices 0x000000018986ebc0 GSEventRunModal + 160
23 UIKitCore 0x0000000109c1bfdc -[UIApplication _run] + 868
24 UIKitCore 0x0000000109c1fc54 UIApplicationMain + 124
25 UIKitCore 0x00000001090e1ab8 __swift_destroy_boxed_opaque_existential_1Tm + 12244
26 interfaceBuilderBasics 0x00000001005ac520 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 120
27 interfaceBuilderBasics 0x00000001005ac498 $s22interfaceBuilderBasics11AppDelegateC5$mainyyFZ + 44
28 interfaceBuilderBasics 0x00000001005ac59c main + 28
29 dyld 0x0000000100c69558 start_sim + 20
30 ??? 0x0000000100656058 0x0 + 4301611096
31 ??? 0xf04d000000000000 0x0 + 17315496142309425152
)
libc++abi: terminating due to uncaught exception of type NSException
warning: Module "/usr/lib/system/libsystem_kernel.dylib" uses triple "arm64-apple-macosx14.0.0", which is not compatible with the target triple "arm64-apple-ios17.0.0-simulator". Enabling per-module Swift scratch context.
I would appreciate your help to find and fix this error