react-native-awesome-card-io icon indicating copy to clipboard operation
react-native-awesome-card-io copied to clipboard

Guidecolor doesn't work as string on iOS

Open corymsmith opened this issue 7 years ago • 1 comments

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

corymsmith avatar May 25 '17 18:05 corymsmith

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).

billdozr avatar Mar 14 '18 22:03 billdozr