Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Conversation

@adrianso
Copy link

@adrianso adrianso commented Sep 30, 2019

Set brightness level in main thread.

@adrianso adrianso changed the title Set brightness level in main thread iOS 13 compatibility Sep 30, 2019
@adrianso adrianso mentioned this pull request Sep 30, 2019
@bcalik
Copy link

bcalik commented Dec 9, 2019

Will this ever be merged? @Calvin-Huang

Fixed the following build warning:
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed soon.
@cinnabarcaracal
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants