Forum Archive

About the Screen Brightness

ki-ya.

The following sample program does not processed. Please repair.
SCRIPT LIBRARY -> This iPhone -> Examples -> ObjC -> Screen Brightness.py

My device: iPhone 8 Plus
Program: Pythonista ver.3.3(330025)

cvp

@ki-ya. Sine iOS 13 and V3.3, a lot of objectivec functions need to be run in main thread,
Thus add line

@on_main_thread 
def main(): 
cvp

In this case, the _objc_exception.txt file in root contains

The app was terminated due to an Objective-C exception. Details below:

2020-03-01 07:42:30.297708
threading violation: expected the main thread 
ki-ya.

@cvp Thank you. The program has been repaired with your advice.

Yiliana

As for your brightness problem on your iPhone, you could check out this article to deal with your trouble. And no matter what kind of brightness issue you met with, it can help you.