Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignatureCanvas not working on ios device and and simulator #370

Open
alimurad-1 opened this issue Nov 25, 2024 · 3 comments
Open

SignatureCanvas not working on ios device and and simulator #370

alimurad-1 opened this issue Nov 25, 2024 · 3 comments

Comments

@alimurad-1
Copy link

I am trying to get users signature in my app

the code works fine and as desired in android but in ios it works only once and then it doesn't and sometimes it didn'teven work for the first time when app is loaded

I even downgraded my packages to the versions that I had used in another app of mine but no success

below is my code for that

//SignatureView

<View
style={{
width: wp(90),
height: 280,
borderWidth: 1,
borderStyle: 'dashed',
borderRadius: 12,
borderColor: 'rgba(255, 243, 220, .2)',
}}>
<SignatureScreen
ref={signRef}
autoClear={true}
onOK={handleOK}
onClear={handleClearSignature}
scrollable={false}
webStyle={webStyle}
webviewContainerStyle={{backgroundColor: 'transparent'}}
trimWhitespace={true}
penColor="black"
androidLayerType="none"
onBegin={() => setDisableScroll(true)}
onEnd={() => setDisableScroll(false)}
/>

//fucntions         

  const signRef = useRef(null);

const webStyle = .m-signature-pad--footer { display: none; margin: 0px; padding: 0px; background-color: transparent; } .m-signature-pad { background-color: transparent; border: 0; } .m-signature-pad--body { border: none; };

const handleOK = signature => {
setSignatureData(signature);

};

const handleClearSignature = () => {
setSignatureData(null);
setSignatureUrl(null);
signRef.current?.clearSignature();
};

//package.json

"react-native-signature-canvas": "^4.7.1",
"react-native-webview": "^13.6.2",

//Xcode version
15.1

//simulator
iphone 15 Pro - ios 17.2

@saadkhalil01
Copy link

i have this same issue within ios :(

@svencoding
Copy link

same issue with ios

@rvmaher
Copy link

rvmaher commented Nov 28, 2024

Try changing react-native-webview version.i was facing similar issue on 13.10.x+. but works on 13.6.x<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants