react-native-awesome-card-io
react-native-awesome-card-io copied to clipboard
Guidecolor doesn't work as string on iOS
You have to use processColor
first which doesn't match what the docs say. It looks like a similar fix was added for Android a while back. https://github.com/Kerumen/react-native-awesome-card-io/commit/b84d21ca2fbccedeb139822459891275abc9b274
This is how to directly use processColor
for iOS in the mean time to set guideColor
:
import {
Platform,
processColor
} from 'react-native'
let conf = {
guideColor: Platform.OS === 'ios' ? processColor(myColor) : myColor
...
}
CardIOModule.scanCard(conf).then(card => { ... })
Tested with react-native v0.53.3
(but should work with other versions).