kivy/pyobjus

AttributeError: 'bridge' object has no attribute 'startDeviceMotion'

ChrHenke opened this issue · 0 comments

I am trying to use pyobjus within the spatialorientation example from plyer:

https://github.com/kivy/plyer/blob/master/examples/spatialorientation/main.py

System: macOS Monterey 12.6, Xcode 14.0.1, iPhone XS, iOS 16.0.3
Software: Plyer: 2.0.0, pyobjus: 1.2.1

However, I get the above error:

Traceback (most recent call last):
File "/Users/chris/cloud/sync/kivy/kivymd/spatialorientation-ios/YourApp/main.py", line 76, in
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/app.py", line 955, in run
runTouchApp()
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/base.py", line 574, in runTouchApp
EventLoop.mainloop()
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/base.py", line 339, in mainloop
self.idle()
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/base.py", line 383, in idle
self.dispatch_input()
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/base.py", line 334, in dispatch_input
post_dispatch_input(*pop(0))
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/base.py", line 302, in post_dispatch_input
wid.dispatch('on_touch_up', me)
File "kivy/_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/uix/behaviors/button.py", line 179, in on_touch_up
self.dispatch('on_release')
File "kivy/_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
File "kivy/_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
File "kivy/_event.pyx", line 1191, in kivy._event.EventObservers._dispatch
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/kivy/lang/builder.py", line 55, in custom_callback
exec(kvlang.co_value, idmap)
File "", line 19, in
File "/Users/chris/cloud/sync/kivy/kivymd/spatialorientation-ios/YourApp/main.py", line 58, in enable_listener
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/plyer/facades/spatialorientation.py", line 43, in enable_listener
self._enable_listener()
File "/private/var/containers/Bundle/Application/D932820D-5E4D-4281-9E7B-E11CB78B2B48/spatialorientation.app/lib/python3.9/site-packages/plyer/platforms/ios/spatialorientation.py", line 18, in _enable_listener
self.bridge.startDeviceMotion()
File "pyobjus/pyobjus_types.pxi", line 640, in pyobjus.pyobjus.ObjcClassInstance.getattribute
AttributeError: 'bridge' object has no attribute 'startDeviceMotion'
2022-11-02 12:18:56.527023+0100 spatialorientation[50237:4403567] Application quit abnormally!
2022-11-02 12:18:56.554201+0100 spatialorientation[50237:4403567] Leaving