kivy/kivy-ios

Working app crash on iOS 17

sysnux opened this issue · 7 comments

sysnux commented

My app has been working on iOS for a few years:
https://apps.apple.com/fr/app/polyapp-banque-de-polyn%C3%A9sie/id1570748267

But tests on iOS-17 beta show it is now crashing on startup.
I have rebuilt the app with latest Xcode-14 as requested, but still same crash on startup, without indication on what is wrong.

I could not find any hints on Kivy forums, is this a known problem? Has anyone tried iOS-17?

misl6 commented

Hi @sysnux !

On iOS 17 Simulator, with XCode 15 RC1, everything works like a charm.

  • Is your app using any feature that has been removed in iOS 17?
  • What happens when the app is run via XCode in debug mode?
sysnux commented

Hi @misl6,
Thanks for your reply.
I was able to confirm my app works fine on iOS 17 simulator, with Xcode 15.0 (15A240d). I just had to change "User Script Sandboxing" to No.
Still, I does not work on iPhone :(

misl6 commented

Hi @sysnux

With iOS 17 and XCode 15 now generally available, I can confirm that I'm not able to reproduce your issue even on a real device (iPhone 14 Pro).

I also did not needed to change "User Script Sandboxing" to NO in order to have the app running on the simulator.

Do you have any log that can help to debug?
(I'm keeping the issue open as you may be using a specific feature that need to be fixed, but without any log is hard to triage it)

sysnux commented

Hi @misl6

The application is now working fine, and an iOS17 compatible version is on the Apple Store, yeah!

The crash was actually in plyer. My code is using uniqueid.id from plyer, which generates TypeError on iOS17 iPhone only (not on Simulator):

  File "/.../site-packages/plyer/platforms/ios/uniqueid.py", line 19, in _get_uid
     uuid = UIDevice.currentDevice().identifierForVendor.UUIDString()
 TypeError: 'Swift.__StringStorage' object is not callable

I changed my code to:

       try:
            self.uniqueid = uniqueid.id
        except (TypeError, NotImplementedError, NameError):

Concerning "User Script Sandboxingg", I still have the error if I enable it:
Sandbox: rsync deny file-read-data /Users/..../polyapp-ios/YourApp
Maybe specific to this application, not sure why.

You can close the issue, thanks!

misl6 commented

@sysnux can you please target this specific issue with a PR on plyer? 😃

sysnux commented

Hi @misl6,

I can't test the fix, so PR is not possible, sorry.
I opened an issue instead: kivy/plyer#773

Thanks for your support!

Closing as duplicate of Plyer issue.