amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 9 forks source link

`UIAccessibilityPostNotification` for Apple Watch #2

Closed amirrajan closed 7 years ago

amirrajan commented 7 years ago

Imported from YouTrack:

UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, "Page 1")

Extension[88604:10190733] in `method_missing:': undefined method `UIAccessibilityPostNotification' for #<CalculatorInterfaceController:0xef86d80> (NoMethodError)
from in `accessibility_announcement:'
from in `change_page:'
from in `block in change_page:'
from in `change_page:'
from in `willActivate'

* First throw call stack:
(
0 CoreFoundation 0×0323ea0d __exceptionPreprocess + 189
1 libobjc.A.dylib 0×00510d5f objc_exception_throw + 49
2 0×00284aae _ZL10__vm_raisev + 350
3 0×00284b4c rb_vm_raise + 92
4 0×00172d01 rb_exc_raise + 17
5 0×00282610 rb_vm_method_missing + 768
6 0×0024d66f rb_method_missing + 31
7 0×0025b14d rb_vm_dispatch + 5069
8 0×00259adc rb_vm_trigger_method_missing + 1004
9 0×0025ad7d rb_vm_dispatch + 4093
10 0×0024e278 send_internal + 504
11 0×0024d69f rb_f_send + 31
12 0×0025b14d rb_vm_dispatch + 5069
13 0×00089835 vm_dispatch + 1253
14 0×0008b5c5 rb_scope__method_missing:__ + 229
15 0×00269f54 ZL20dispatch_rimp_callerPFP11objc_objectS0_P13objc_selectorzEmS2_iPKm + 46404
16 0×0025b8ee rb_vm_dispatch + 7022
17 0×00259adc rb_vm_trigger_method_missing + 1004
18 0×0025ad7d rb_vm_dispatch + 4093
19 0×0011a075 vm_dispatch + 1253
20 0×0011e014 rb_scopeaccessibility_announcement:_ + 180
21 0×00269f54 ZL20dispatch_rimp_callerPFP11objc_objectS0_P13objc_selectorzEmS2_iPKm + 46404
22 0×0025b8ee rb_vm_dispatch + 7022
23 0×000a3d15 vm_dispatch + 1253
24 0×000aabfd rb_scopechange_page:_ + 2205
25 0×00269f54 ZL20dispatch_rimp_callerPFP11objc_objectS0_P13objc_selectorzEmS2_iPKm + 46404
26 0×0025b8ee rb_vm_dispatch + 7022
27 0×000b8a85 vm_dispatch + 1253
28 0×000c6256 rb_scopechange_page:_block__ + 182
29 0×0027569b _ZL20dispatch_bimp_callerPFP11objc_objectS0_P13objc_selectorzEmS2_mP11rb_vm_blockiPKm + 46475
30 0×0025d35d ZL13vm_block_evalP7RoxorVMP11rb_vm_blockP13objc_selectormiPKm + 1357
31 0×0025d70b rb_vm_yield_args + 75
32 0×0024c243 rb_yield + 67
33 0×0013e22a raryeach + 58
34 0×00269f54 ZL20dispatch_rimp_callerPFP11objc_objectS0_P13objc_selectorzEmS2_iPKm + 46404
35 0×0025b8ee rb_vm_dispatch + 7022
36 0×000b8a85 vm_dispatch + 1253
37 0×000c613b rb_scopechange_page:_ + 2187
38 0×00269f54 ZL20dispatch_rimp_callerPFP11objc_objectS0_P13objc_selectorzEmS2_iPKm + 46404
39 0×0025b8ee rb_vm_dispatch + 7022
40 0×000b8a85 vm_dispatch + 1253
41 0×000c0231 rb_scope_willActivate__ + 1697
42 0×000c0ca8 __unnamed_80 + 24
43 WatchKit 0×00c44901 [SPRemoteInterface _activateViewController:clientIdentifier:] + 292
44 WatchKit 0×00c44650 __61[SPRemoteInterface activateViewController:clientIdentifier:]_block_invoke_3 + 35
45 WatchKit 0×00c61f69 [WKInterfaceController _finishGestureInstallationWithCompletion:] + 420
46 WatchKit 0×00c445fc __61[SPRemoteInterface activateViewController:clientIdentifier:]_block_invoke_2 + 169
47 WatchKit 0×00c4812f [SPRemoteInterface performAfterApplicationDidFinishLaunching:] + 43
48 WatchKit 0×00c4452a __61[SPRemoteInterface activateViewController:clientIdentifier:]_block_invoke + 133
49 libdispatch.dylib 0×03b7c73b _dispatch_call_block_and_release + 15
50 libdispatch.dylib 0×03b9eecf _dispatch_client_callout + 14
51 libdispatch.dylib 0×03b8589f _dispatch_main_queue_callback_4CF + 1053
52 CoreFoundation 0×0320275e CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 14
53 CoreFoundation 0×031c873d __CFRunLoopRun + 2445
54 CoreFoundation 0×031c7b24 CFRunLoopRunSpecific + 372
55 CoreFoundation 0×031c799b CFRunLoopRunInMode + 123
56 Foundation 0×02575d50 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
57 Foundation 0×02575c11 -[NSRunLoop(NSRunLoop) run] + 69
58 libxpc.dylib 0×03e81f32 xpc_objc_main + 476
59 libxpc.dylib 0×03e847cd xpc_main + 215
60 Foundation 0×025d1def -[NSXPCListener resume] + 185
61 PlugInKit 0×042128d1 -[PKService run] + 799
62 WatchKit 0×00c78a58 main + 148
63 0×00002a3d main + 221
64 libdyld.dylib 0×03bd7835 start + 1
)
amirrajan commented 7 years ago

It doesn't look like UIAccessibilityPostNotification is available on WatchOS:

┌── [ /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform  ]
└─» ag UIAccessibilityPostNotification
Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd
119:                       _UIAccessibilityPauseAssistiveTechnologyNotification, _UIAccessibilityPostNotification,

Here are what the headers look like for iPhoneOS:

┌── [ /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform  ]
└─» ag UIAccessibilityPostNotification
Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h
367: UIAccessibilityPostNotification
374:UIKIT_EXTERN void UIAccessibilityPostNotification(UIAccessibilityNotifications notification, __nullable id argument);

Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd
186:                       _UIAccessibilityPauseAssistiveTechnologyNotification, _UIAccessibilityPostNotification,
katsuyoshi commented 7 years ago

Thank you for investigation. I understand. I'll wait it is supported for WatchOS.