I know PythonistaKit hasn't really seen much attention recently, but this one is strange as it works in the simulator (and on the App Store version of Pythonista).

I'm upgrading by app for iPhone X and for some reason I can't press any of the buttons on a dialog box generated with dialogs.alert(). The dialog can be dismissed by keyboard if it has a text field.

Anyone have any idea what may have changed and what I could do to troubleshoot this?

]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulatorhttps://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulatorMon, 13 Nov 2017 05:50:57 GMTTell a lie- It doesn't work in the simulator either. Just doesn't work on iPhone X.

May have to dig down and do some debugging in the code for it

]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/2https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/2Mon, 13 Nov 2017 06:36:47 GMTI do not believe this is related to iPhone X, but iOS 11. I have an iPhone 6 Plus. Once I updated to iOS11, dialogs.alert() broke (and other related dialogs). I know this because I updated to iOS 11 in the middle of this code development and noticed it immediately.

You can have a simple message alert with an Ok button. Once the message comes up, I have to force quit Pythonista because the Ok button is not "clickable". It doesn't even highlight when touched. So it appears the app freezes, but not sure.

]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/4https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/4Tue, 14 Nov 2017 13:24:26 GMT@donnieh Hmm, I can't reproduce this. That line works fine here, just tested this both in the App Store version and the beta (on iOS 11).

]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/7https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/7Wed, 15 Nov 2017 10:23:55 GMTDoes it on iPhone 6S and 7 too. Definitely iOS related. Dialogs is definitely broke, but not sure why it works for some people.
]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/9https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/9Tue, 21 Nov 2017 10:58:59 GMTI looked up the documentation for dialog.alert, and was directed to look at console.alert.

I found this topic from 3 years ago about a similar hang with console.alert.

Now just to work out this more difficult "code signing" issue with the .py files :/

]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/12https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/12Sun, 03 Dec 2017 21:52:40 GMTGuys, did the real problem get solved here or just a work around? It seems to me that the dialogs module should be updated to deal with this. I am not sure I am right, but it seems that way. If so, I can create an issue on the github repo issues. I just want to make sure I understand before I create an issue on the repo.
]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/13https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/13Mon, 04 Dec 2017 10:25:04 GMTWouldn't say the real issue is resolved, there should probably be a fixed default behavior here in Pythonista.

I've also had problems using this workaround with input_alert() - if I decorate with @ui.in_background then I get :

Main Thread Checker: UI API called on a background thread: -[UIView subviews]

Works with @on_main_thread

]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/14https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/14Mon, 18 Dec 2017 05:04:37 GMTMaybe one of the guys here that understands this problem more in depth could raise an issue on the Pythonista issues repo. To me it seems like that the dialogs module and console module etc... could have the decorators in place that avoids these issues when using the API in a straight forward way. But I am guessing about that. For example, I dont understand exactly why these issues are getting more prevalent. I.e is it changes to iOS or is the processing speed of the devices etc? Because this stuff worked for a long time without these issues.
Eg, I often pass animated=False to ui.Present. This can create problems, but only sometimes on the same device. You can avoid the problems using a delay, but using the decorator might also fix it. But it gets complicated and hard to debug if you are not aware of the behaviour
]]>https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/15https://forum.omz-software.com/topic/4503/pythonistakit-dialogs-alert-buttons-can-t-be-pressed-on-real-iphone-x-but-it-works-in-simulator/15Mon, 18 Dec 2017 09:26:31 GMTAny update on this? I had a dialog (dialogs.alert) with 2 buttons that was working, now it is behaving like this... the buttons are now non-responsive. I have to kill the app. The dialog was wrapped in a function. I decorated the function with @ui.in_background and that caused the dialog to not appear at all.

It was working on my Iphone 8 and my Ipad pro... now it is not working on either.

Dialogs.alert with only "OK" and hide_cancel_button=True seem to work fine.