react-native-device-brightness icon indicating copy to clipboard operation
react-native-device-brightness copied to clipboard

iOS 13 compatibility

Open adrianso opened this issue 5 years ago • 2 comments

Set brightness level in main thread.

adrianso avatar Sep 30 '19 01:09 adrianso

Will this ever be merged? @Calvin-Huang

bcalik avatar Dec 09 '19 19:12 bcalik

In hopes of making this easier for others to track down, we started getting crash reports similar to this:

Last Exception Backtrace:
0   CoreFoundation                	0x1b7e84300 __exceptionPreprocess + 228 (NSException.m:199)
1   libobjc.A.dylib               	0x1b7b98c1c objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreFoundation                	0x1b7d811f8 +[NSException raise:format:arguments:] + 100 (NSException.m:146)
3   Foundation                    	0x1b81c5998 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132 (NSException.m:231)
4   FrontBoardServices            	0x1bd132c5c -[FBSSerialQueue assertOnQueue] + 236 (FBSSerialQueue.m:98)
5   FrontBoardServices            	0x1bd0e5690 -[FBSSceneImpl updateClientSettings:withTransitionContext:] + 80 (FBSSceneImpl.m:190)
6   FrontBoardServices            	0x1bd0e5914 -[FBSSceneImpl updateClientSettingsWithTransitionBlock:] + 160 (FBSSceneImpl.m:213)
7   FrontBoardServices            	0x1bd0e5814 -[FBSSceneImpl updateClientSettingsWithBlock:] + 128 (FBSSceneImpl.m:203)
8   UIKitCore                     	0x1bbb25a4c -[FBSScene(UIApp) updateUIClientSettingsWithBlock:] + 184 (FBSScene+UIApp.m:41)
9   UIKitCore                     	0x1bbc2455c -[UIDevice _setBacklightLevel:] + 172 (UIDevice.m:935)
10  UIKitCore                     	0x1bbc2f544 -[UIScreen setBrightness:] + 360 (UIScreen.m:2709)
11  AppName                 	0x104368ec0 -[RNDeviceBrightness setBrightnessLevel:] + 68 (RNDeviceBrightness.m:17)
...

We were able to resolve the issue by switching to this PR:

// package.json
"react-native-device-brightness": "Calvin-Huang/react-native-device-brightness#26/head",

Given the introduction of autolinking and the iOS 13 issue, it would be nice if this could be merged.

cinnabarcaracal avatar Jul 16 '20 03:07 cinnabarcaracal