plyer icon indicating copy to clipboard operation
plyer copied to clipboard

on IOS with Xcode 12.4, plyer uniqueid claims that it's not implemented ( NotImplementedError )

Open olivier-boesch opened this issue 3 years ago • 2 comments

Hello, I'm working on a app that should work on both android and ios. I face an error with the uniqueid module on ios. it claimes that it is not implemented. I also read the plyer doc that says that it's implemented.

I tried a simple code:

from kivy.app import App
from kivy.base import Builder
from plyer import uniqueid

rt = Builder.load_string("""
BoxLayout:
    Label:
        id: textlbl
""")

class TestApp(App):
    def build(self):
        return rt
    
    def on_start(self):
        self.root.ids['textlbl'].text = str(uniqueid.id)

app = TestApp()
app.run()

and it gives me the following output:

...
Got dlopen error on Foundation: dlopen(/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 1): image not found
Got fallback dlopen error on Foundation: dlopen(/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 1): image not found
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'OpenGL ES 2.0 APPLE-18.0.31'>
[INFO   ] [GL          ] OpenGL vendor <b'Apple Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'Apple Software Renderer'>
[INFO   ] [GL          ] OpenGL parsed version: 2, 0
[INFO   ] [GL          ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO   ] [GL          ] Texture max size <4096>
[INFO   ] [GL          ] Texture max units <8>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
 Traceback (most recent call last):
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/pyobjus/dylib_manager.py", line 187, in load_framework
     if bundle.load():
 AttributeError: 'NoneType' object has no attribute 'load'
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/plyer/utils.py", line 93, in _ensure_obj
     mod = __import__(module, fromlist='.')
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/plyer/platforms/ios/uniqueid.py", line 9, in <module>
     load_framework('/System/Library/Frameworks/UIKit.framework')
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/pyobjus/dylib_manager.py", line 190, in load_framework
     raise ObjcException('Error while loading {0} framework'.format(framework))
 pyobjus.pyobjus.ObjcException: Error while loading /System/Library/Frameworks/UIKit.framework framework
 Traceback (most recent call last):
   File "/Users/olivier/tryid-ios/YourApp/main.py", line 18, in <module>
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/kivy/app.py", line 949, in run
     self._run_prepare()
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/kivy/app.py", line 944, in _run_prepare
     self.dispatch('on_start')
   File "kivy/_event.pyx", line 724, in kivy._event.EventDispatcher.dispatch
   File "/Users/olivier/tryid-ios/YourApp/main.py", line 15, in on_start
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/plyer/utils.py", line 114, in __getattribute__
     result = getattr(object.__getattribute__(self, '_obj'), name)
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/plyer/facades/uniqueid.py", line 42, in id
     return self.get_uid()
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/plyer/facades/uniqueid.py", line 49, in get_uid
     return self._get_uid()
   File "/Users/olivier/Library/Developer/CoreSimulator/Devices/42A27DD6-AA3A-4801-946A-17B0C2D03BCD/data/Containers/Bundle/Application/F6277A45-7A50-4D27-A2CB-CBD68B5107F2/tryid.app/lib/python3.8/site-packages/plyer/facades/uniqueid.py", line 54, in _get_uid
     raise NotImplementedError()
 NotImplementedError
2021-04-19 15:25:33.983240+0200 tryid[1462:40965] Application quit abnormally!
2021-04-19 15:25:34.028691+0200 tryid[1462:40965] Leaving

Am I doing things bad ? Is there an issue ?

Thanks.

olivier-boesch avatar Apr 19 '21 15:04 olivier-boesch

Same issue.

lightningorb avatar Jun 19 '22 13:06 lightningorb

same issue. Any luck for you side ?

ynareshkalyan21 avatar Sep 25 '22 12:09 ynareshkalyan21

I am getting the same error. Do you have any update?

lchen110 avatar Nov 03 '22 15:11 lchen110

This is a guess based on what I have seen in other issues.

Have you got pyobjus installed?

Try pip install plyer[ios]

Julian-O avatar Oct 27 '23 00:10 Julian-O

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have the means to take action. Please reach out if you have or find the answers we need so that we can investigate further.

github-actions[bot] avatar Dec 08 '23 01:12 github-actions[bot]