codemotionapps/react-native-dark-mode

Error when building xcode cocoapod project

Closed this issue · 3 comments

I am getting an error when trying to build the project generated by pod install:

[PROJECT_DIR]/node_modules/react-native-dark-mode/ios/UIScreen+RNDarkModeTraitChangeListener.m:55:60: Property 'currentTraitCollecton' not found on object of type 'UITraitCollection'

If I take out line 55 (https://github.com/codemotionapps/react-native-dark-mode/blob/master/library/ios/UIScreen%2BRNDarkModeTraitChangeListener.m#L55) locally, the ios app builds and runs on my iPhone, but it does not update dark mode properly (always shows app in light theme).

Are you using Xcode 11?

Screen Shot 2019-09-27 at 11 10 25 AM

I downloaded the files to be able to run against an iOS 13 device

As stated in requirements, you need Xcode 11