Open ziga-hvalec opened 1 year ago
We are having the same problem. It is working in iOS but not in Android
Support said they have some issues. Workaround is apparently to pass style prop to the view you're trying to hide. style={{}} is enough. I haven't yet tested this
Hi, @ziga-hvalec @egealpay
Please apply backgroundColor as transparent or you can add own color
style={{backgroundColor: 'transparent'}}
We also noticed we were getting a Red Screen of Death when using occludeSensitiveView and WebView
<WebView ref={(ref) => { RNUxcam.occludeSensitiveView(ref); }>
The current types allow this to be possible. However, once we try to occlude the web view, we get the following error:
Argument appears to not be a ReactComponent
Which is surprising, because the WebView extends React Component.
Our workaround was to wrap WebView in a View component and occlude that:
<View ref={(ref) => { RNUxcam.occludeSensitiveView(ref); }>
<WebView />
<View>
This could more clearly be enforced with types
static occludeSensitiveView: (sensitiveView: any) => void;
could become something like
static occludeSensitiveView: <T extends View | null>(sensitiveView: T) => void;
or
static occludeSensitiveView: <T extends React.ComponentRef<any>>(sensitiveView: T) => void;
I'm not sure what type is better because I'm not sure what the internal list of allowed components is actually correct.
We are using occludeSensitiveView to hide credit card info. It mostly works but randomly stops working.
Any workarounds for this?
Our implementation
` <View ref={(view) => { if (view) RNUxcam.occludeSensitiveView(view); }}