react-native-device-clock-format
Determine whether the device is set to 12 or 24 hour time.
Add it to your project
- Run
npm install react-native-device-clock-format --save
- Open your project in XCode, right click on
Libraries
and clickAdd Files to "Your Project Name"
- Add
libDeviceClockFormat.a
toBuild Phases -> Link Binary With Libraries
. - Whenever you want to use it within React code now you can:
var DeviceClockFormat = require('react-native-device-clock-format');
Example
'use strict'; var React = ;var AppRegistry StyleSheet Text View TouchableOpacity = React; var DeviceClockFormat = ; var SampleApp = React; var styles = StyleSheet; AppRegistry;