react-native-date-picker icon indicating copy to clipboard operation
react-native-date-picker copied to clipboard

[iOS] v2.7.3 breaks build on iOS 12.1

Open dansiemens opened this issue 6 years ago • 4 comments

Describe the bug App build fails with [email protected] installed running on iOS 12.1 simulator. Downgrading to 2.7.2 resolves this issue.

Errors given:

node_modules/react-native-date-picker/ios/RNDatePicker/DatePicker.m:54:18: error: property 'overrideUserInterfaceStyle' not found on object of type 'DatePicker *'
            self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
                 ^
node_modules/react-native-date-picker/ios/RNDatePicker/DatePicker.m:86:18: error: property 'overrideUserInterfaceStyle' not found on object of type 'DatePicker *'
            self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
                 ^
node_modules/react-native-date-picker/ios/RNDatePicker/DatePicker.m:91:18: error: property 'overrideUserInterfaceStyle' not found on object of type 'DatePicker *'
            self.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;
                 ^
3 errors generated.

Expected behavior App build should succeed

To Reproduce Add example code that reproduces the behavior.

export default class App extends Component {

  state = { date: new Date() }

  render = () =>
    <DatePicker
      date={this.state.date}
      onDateChange={date => this.setState({ date })}
    />

}

Smartphone (please complete the following information):

  • OS: [iOS]
  • React Native version: [0.61.4]
  • react-native-date-picker version: [2.7.3]

dansiemens avatar Jan 10 '20 22:01 dansiemens

Hi, thanks for reporting this! I am not able to create an iOS 12 simulator at the moment but I manage to run the app on a physical device with iOS 12.4. I suspect it has to do with the Xcode version, which version do you have?

henninghall avatar Jan 11 '20 09:01 henninghall

Same issue here. Perhaps to recreate the issue you need to clear node_modules first?

Also works if I downgrade. I'm using xcode 10.3. My simulator is running iOS 12.4.

matt-dalton avatar Jan 14 '20 12:01 matt-dalton

I realize that that bugfixes related to iOS 13 released in version 2.7.3 will require the use of Xcode 11. Unfortunately, I don't see any way around that except upgrading Xcode or downgrading the library to 2.7.2. I would recommend upgrading Xcode (might require OS upgrade) if you want to be able to support iOS 13 features like dark mode or "Sign in with Apple".

I will update the docs with this info. Sorry for the inconvenience!

henninghall avatar Jan 14 '20 13:01 henninghall

Thanks @henninghall for following up. Running Xcode 10.1 so will remain on 2.7.2 for the time being. Cheers.

dansiemens avatar Jan 14 '20 17:01 dansiemens