react-native-screen-brightness
react-native-screen-brightness copied to clipboard
pls update module for RN-0.40 it crash app
solution for RN >=0.40 for time being :
-
open Xcode, found ScreenBrightness.xcodeproj (as usually in Libraries)
-
replace import files in ScreenBrightness.h file : #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <React/RCTBridgeModule.h> #import <React/RCTBridge.h> #import <React/RCTEventDispatcher.h>
-
comment import files in ScreenBrightness.m file : #import "ScreenBrightness.h" //#import "RCTBridgeModule.h" //#import "RCTBridge.h" //#import "RCTEventDispatcher.h" //#import <React/RCTBridgeModule.h> //#import <React/RCTBridge.h> //#import <React/RCTEventDispatcher.h>
there will be only one import : #import "ScreenBrightness.h"

Thanks for the report, we'll making some updates for compatability
Fixed in https://github.com/robinpowered/react-native-screen-brightness/pull/15. A release will be tagged soon, where this issue will become closed.