yanyuanfe / react-native-signature-canvas Goto Github PK
View Code? Open in Web Editor NEW:black_nib: React Native Signature Component based WebView Canvas for Android && IOS && expo
License: MIT License
:black_nib: React Native Signature Component based WebView Canvas for Android && IOS && expo
License: MIT License
Hi, i have the following error on Android device :
crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported
Do you have the same pb?
Hi,
After Expo CLI update I now get the following red error:
Invariant Violation: requireNativeComponent: "RNCWebView" was not found in the UIManager.
I'm using react-native-webview 7.0.1
Any idea how to fix this?
Hi,
i'm a newbie on react native
i'm trying to use readSignature using the example...
but when i finished to sign the screen reset
`import SignatureScreen from 'react-native-signature-canvas';
const Sign = ({text, onOK}) => {
const ref = useRef();
const handleSignature = signature => {
setFirma(signature);
};
const handleEmpty = () => {
console.log('Empty');
}
const handleClear = () => {
console.log('clear success!');
}
const handleEnd = () => {
ref.current.readSignature();
}
return (
);
}
export default Sign;
`
setFirma is: const [firma,setFirma] = useState('');
My basic signature app is not working in Nexus 5 Anroid 6.0.1 OS. Its working fine in other devices .
Hi, it will be good if there is a feature to allow passing an image via prop and the canvas will display the image on load.
When i call the component outside of router flux, it runs well. Inside of router flux the component is invisible - seem to be not running. There is no error message and no warnings.
Hi there 👋
Apple has announced that they're going to be deprecating the UIWebView APIs, and will stop accepting apps that use it. Because react-native-signature-canvas
relies on react-native-webview
, using this lib would result in the deprecation warning from Apple.
Luckily, react-native-webview
already has a fix out that removes UIWebView
from their dependencies. I believe all that is required is to update to the latest version, which is 7.0.1
at the time this issue was created.
You can find plenty of context in the linked issue: react-native-webview/react-native-webview#819
Thanks for the awesome lib!
hi bro's,
i want to upload signature to server using RNFetchBlob Library,
for showing in web , but i can't :D
please help me and shown me any example code,
thanks all ;)
Is there any way to adjust the canvas size or crop the resulting image to the content inside instead of having large areas of unused transparent space? The images produced are very large compared to some other libraries I've used.
The component works great in Expo, but when I build for android and install the apk, the component stop working and the screen stays gray. Any suggestions?
UI looks same, but when we try to sign, nothing happens , seems like something is broken, downgrading to 1.3.0 works fine
Hi,
will you have your module work with Expo sdk 37?
I followed the following: (adding react-native-get-random-values package and importing it from index.js of my project and from react-native-webview index.js at the top). I also cleared the cache, and now have that issue:
null is not an object (evaluating 'RNGetRandomValues.getRandomBase64')
* http://192.168.1.10:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:124340:35 in getRandomValues
* [native code]:null in getRandomValues
* http://192.168.1.10:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:157913:63 in v4
- node_modules/react-native-signature-canvas/node_modules/react-native-webview/lib/WebView.android.js:79:8 in WebView
react-native-signature-canvas require version 9.2.1 of react-native-webview
whereas
Expo requires version 8.1.1
How can i do please?
Thanks
If i try any examples to run on expo web I get an infinite loading state and nothing else. what might I be doing wrong?
I've tried installing the new 1.7.1 build via NPM. Does the new build work on Expo as well? I currently have my component rendering like this:
<View>
<Signature
key={value}
// handle when you click save button
onOK={img => console.log(img)}
onEmpty={() => {}}
// description text for signature
descriptionText="Your answer"
// clear button text
clearText="Clear"
// save button text
confirmText="Send"
autoClear={true}
/>
</View>
But it doesn't seem to reset the canvas when I click send. I also made sure to check my dependencies and I do have the newest version:
"dependencies": {
"expo": "~36.0.0",
"expo-image-picker": "^8.0.2",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native-signature-canvas": "^1.7.1",
"react-native-svg": "9.13.3",
"react-native-web": "~0.11.7",
"rn-draw": "0.0.6"
},
Perhaps I've done something wrong?
Hi YanYuan,
I need to capture 5 signatures and they don't all fit on the screen, so I've put them in a ScrollView
. The problem is that now I can't sign any more because any vertical movement of my finger is sent to the ScrollView.
Is there a way to get the Signature component to capture these gestures and not pass them on?
Thanks
Hi! I tried a basic example from the readme. In iOS, it works fine, but in Android drawing not working. Nothing happens when drawing, even clicks on Clear/Confirm buttons doesn't work. None of the events called (clear, confirm, begin, end...) works. Here is my code:
import React, { useRef, useState } from 'react';
import { View, StyleSheet, Modal, TouchableOpacity, Text } from 'react-native';
import SignatureScreen from 'react-native-signature-canvas';
const styles = StyleSheet.create({
container: {
flex: 1,
height: 200,
borderWidth: 1
}
})
function Signature({text = 'test signature', onOK = () => {}}) {
const ref = useRef();
const [ show, setShow ] = useState(false);
const showSignature = () => setShow(true);
const handleSignature = signature => {
console.log(signature);
onOK(signature);
};
const handleEmpty = () => {
console.log('Empty');
}
const handleClear = () => {
console.log('clear success!');
}
const handleEnd = () => {
ref.current.readSignature();
}
const handleBegin = () => {
console.log('begin!');
};
return (
<View style={styles.container}>
<TouchableOpacity onPress={showSignature}><Text>Show signature view</Text></TouchableOpacity>
{show && <Modal>
<SignatureScreen
ref={ref}
onEnd={handleEnd}
onOK={handleSignature}
onEmpty={handleEmpty}
onClear={handleClear}
onBegin={handleBegin}
autoClear={true}
descriptionText={text}
/>
</Modal>}
</View>
);
}
export default Signature;
Versions:
"react": "~16.11.0"
"react-native": "0.61.3"
"react-native-signature-canvas": "^3.1.0"
"react-native-webview": "^10.3.3"
Android emulator:
Pixel 2 API 23
How can we solve this problem?
I tried to hide the bottom section and I setup the style like this.
.m-signature-pad--footer
{
display: none;
};
Save and clear button hidden but bottom section are still available now.
Is there any solution to hide the bottom bar?
Hi,
I'm trying to use the component but with an own set of buttons to clear and save the signature.
I'm calling the onOK method via a ref but it fails because it doesn't receive the base64 string. I'm wondering if there is a method that could save a state after the user stops drawing and not by pressing the Done button??
Thank you
I am trying to modify the background Url of the body (base64 string) in signature-pad.css, but do not see any change. Should I be able to set a background image this way? If not, is there any other way to enable this?
Thanks
If I render the component together with some other custom components, they stay invisible until I do something on the signature pad. Once I type something on the pad, for example, the rest of the components become visible.
Expo version: 2.6.14
react-native: 0.57.1
When the Signature
component is within a ScrollView
, trying to sign will cause the view to scroll instead.
Hello !
I followed the step to use readSignature
and clearSignature
using a ref but I get this error:
version of plugin: "1.9.0",
version of react: "16.11.0",
react-native: "0.62.2",
Here is part of my code:
const sign1 = useRef()
const sign2 = useRef()
const handleBegin = () => {
setScrollEnable(false);
console.log("BEGIN")
}
const onClear = (sign) => {
setSignatures({ ...signatures, [sign]: "" })
}
const onOk = (sign, img) => {
console.log(img)
setSignatures({ ...signatures, [sign]: img });
}
const handleEnd = (sign) => {
if (sign === "signature_intervenant")
sign1.current?.readSignature()
else
sign2.current?.readSignature()
setScrollEnable(true)
}
return (
<ScrollView
//style={{ height: GlobalVars.height - (GlobalVars.navBarHeight * 3), justifyContent: 'center' }}
scrollEnabled={scrollEnable}
style={{ ...GlobalVars.styles.mainContainer, marginBottom: props.bottomHeight, borderWidth: 1 }}
>
<Text style={[GlobalVars.styles.title]}>Signatures</Text>
<View
style={{
flex: 1,
borderWidth: 1,
paddingBottom: 30,
justifyContent: 'space-between'
}}
>
<View style={{ ...GlobalVars.styles.card, flex: 0, minHeight: height + 20 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<Text style={{ fontFamily: GlobalVars.SEMIBOLD, fontSize: 15, color: GlobalVars.colors.blueGrey }}>Signature intervenant</Text>
<TouchableOpacity
style={styles.removeButton}
onPress={(e) => { sign1.current?.clearSignature() }}
>
<Icon type="ionic" name="trash" color='white' size={15} />
</TouchableOpacity>
</View>
{
show1 &&
<SignatureCanvas
ref={sign1}
onBegin={handleBegin}
onOK={(img) => onOk("signature_intervenant", img)}
onEnd={() => handleEnd("signature_intervenant")}
onClear={() => onClear("signature_intervenant")}
// sendOnEnd
// onEmpty={this.handleEmpty}
webStyle={styleWeb}
/>
}
</View>
And here is what i get when I try to display ref.current
:
context: {}
getSignature: ƒ (e)
props: {webStyle... ", onBegin: ƒ, onOK: ƒ, onEnd: ƒ, onClear: ƒ, …}
refs: {}
renderError: ƒ (e)
source: {}
state: {base64DataUrl: null, isLoading: false}
updater: {isMounted: ƒ, enqueueSetState: ƒ, enqueueReplaceState: ƒ, enqueueForceUpdate: ƒ}
_reactInternalFiber: FiberNode {tag: 1, key: null, stateNode: SignatureView, elementType: ƒ, type: ƒ, …}
_reactInternalInstance: {_processChildContext: ƒ}
isMounted: (...)
replaceState: (...)
__proto__: Component
Where are the two functions ?
Hello I have installed react-native-signature-canvas based on the instruction
However it seems like SignatureScreen import isnt taking in effect as the pencolour and backgroundcolor is still in default, despite changing it and viewing it in expo
module "c:/Users/test/Downloads/react-native-signature-canvas-master/example/expo-app/node_modules/react-native-signature-canvas/index"
Could not find a declaration file for module 'react-native-signature-canvas'. 'c:/Users/micha/Downloads/react-native-signature-canvas-master/example/expo-app/node_modules/react-native-signature-canvas/index.js' implicitly has an 'any' type.
Try npm install @types/react-native-signature-canvas
if it exists or add a new declaration (.d.ts) file containing declare module 'react-native-signature-canvas';
ts(7016)
Thanks in advance for the troubleshoot
Hello! Congratulations for your package!
I would know, how to change colors of buttons?
Hello,
Are you able to update the API so that SVG signature export is possible? These are supported in the wrapped component already.
Thanks
Mike
Hello
How to delete the image already present in the signature to make a new one because i have 2 signature pad in one component.
I would like to call a function that clear after action.
Thank's
I am getting "Invariant Violation: "main" has not been registered." when I try to import SignatureScreen in a expo project ios
Thank you so much. Finally, a good signature capture library that works perfectly.
Is there any possible way I can save the image to the device. Actually, I need to upload a png or jpeg to the server. Something similar to what react-native camera does.
I require the png/jpeg and not the base64 format.
Is there any way to do this. Thank you so much!
i tried to use the Signature-Canvas with in the modal, but is shows nothing. can you help.
The default color of te sign is black I want it to be blue
导入这个组件在会报这个错误
rn版本0.61.5
Hi!
When I use the property imageType="image/jpeg" I received a base 64 codification and when I try to decode i get a black screen.
Environment
react-native-image-picker -> v3.0.0
react-native -> v0.63.0
react -> v16.13.1
react-native-webview -> v10.3.2
JPEG Base64 example
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEB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AAAAAAAAAAAAAAAAAAAAAAAAAA//Z
Hi, Thank you for this cool component.
May I please ask if theres any way to increase the weight of the signature so i can adjust it to match with our live site?
This is the thickness on our site: https://prnt.sc/uth55g
while this is what I get when I send signature: https://prnt.sc/uth6b3
The signature disappears on the change of orientation.
on ios there is an issue due to old react-native-webview
version used. Please update the package to remove this error -
Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability
Could you add a prop autoclear
that can be set to true or false so that the canvas clears automatically when we click on the confirm button?
I need to save the picture and I want to have a background pure white. I see that you can changeit in the signature pad where this is based. Any alternative diferent of change directly signature pad code?
Hi YanYuan!
I´m building an app that requires a signature functionality and your component is just great.
Though in your README I can´t find an example where you save the signature to the gallery, and because I´m new in React Native I haven´t been able to implement a hack that lets me save the signature.
Thanks in advanced!
hi ,
i would like to remove the description and modify the height of the signature place
Is it possible?
Heyy hru? i have some issue when i am testing. i try to run the onOK throught a function, and everything is ok when a i do it on phone but when a i am testing, i get this error.
Invariant Violation: nodeHandle expected to be non-null
63 | const completeDelivery = () => {
> 65 | signature.current?.readSignature();
| ^
66 | };
at invariant (node_modules/invariant/invariant.js:40:15)
at WebView.getWebViewHandle (node_modules/react-native-webview/lib/WebView.ios.js:158:13)
at WebView.injectJavaScript (node_modules/react-native-webview/lib/WebView.ios.js:142:56)
at Object.readSignature (node_modules/react-native-signature-canvas/index.js:82:28)
i was trying a lot of things but it was fruitless.
The moment I add the import i get the following error:
Error: Unable to resolve module
./debugger-ui/debuggerWorker.d9da4ed7 from ``:
Using version 2.0.0 Expo 37
EDIT: Also tried version 1.9.0 wth the same result
I am uploading the signature to server and i want to update the description text when it is uploaded successfully. However i cannot do this once a text has been added, it is not updating with setState. Please help. This is my code
`import React, { useState } from "react";
import { View, StyleSheet } from "react-native";
import Signature from "react-native-signature-canvas";
import { colorStyles } from "../../../css/AppStyles";
import { requestData } from "../../../Api/ApiRequests";
import { UPDATE_SIGNATURE_URL } from "../../../Config/Routes";
import "../../../Utils/Globals";
import Toast from "react-native-simple-toast";
import moment from "moment";
import Loader from "react-native-modal-loader";
const SignatureScreen = (props) => {
const [showLoader, setShowLoader] = useState(false);
//getting the passed values from previous screen through props
let signatureInfo = props.navigation.state.params.signatureInfo;
const [signedOnTime, setSignedOnTime] = useState(signatureInfo.signdate);
const [d, setD] = useState("abc");
const updateSignature= (image) => {
setShowLoader(true);
let obj = {};
obj.employeeId = CLIENT_ID;
obj.operatorID = OPERATOR_ID;
obj.serviceid = signatureInfo.serviceId;
obj.deliveryid = signatureInfo.deliveryID;
obj.signatureimagebase64 = image;
requestData(PROVIDER_URL + UPDATE_SIGNATURE_URL, "POST", obj).then((result) => {
if (result.status == "Successful") {
const date = moment().format("DD/MM/YYYY");
setSignedOnTime(date);
setD("def");
setTimeout(() => {
Toast.show(result.message, Toast.SHORT);
}, 1000);
}
else {
setTimeout(() => {
Toast.show(result.message ?result.message :result, Toast.SHORT);
}, 1000);
}
setShowLoader(false);
})
.catch((error) => {
setTimeout(() => {
Toast.show(error, Toast.SHORT);
}, 1000);
setShowLoader(false);
});
}
return (
<View style = {{ flex : 1 }}>
<Loader loading = { showLoader } />
<Signature
// handle when you click save button
onOK = { (img) => { updateSignature(img) } }
onEmpty = { () => Toast.show("No signature", Toast.SHORT) }
// description text for signature
descriptionText = { "Signed On : " + d }
// clear button text
clearText = "Clear"
// save button text
confirmText = "Save"
// String, webview style for overwrite default style, all style: https://github.com/YanYuanFE/react-native-signature-canvas/blob/master/h5/css/signature-pad.css
webStyle = {
`.m-signature-pad--footer
.description {
color : #000000;
}
.m-signature-pad--footer
.button {
background-color : ${ colorStyles.headerColor };
color : #FFFFFF;
}`
}
//autoClear = { true }
/>
</View>
);
}
const styles = StyleSheet.create({});
export default SignatureScreen;`
Hi,
onOK property(handleSignature function) works on Android but not work on IOS. Please help me.
<Signature onOK={this.handleSignature} descriptionText={this.props.navigation.getParam('ciftciAdSoyad', '0')} clearText="Temizle" confirmText={this.state.imzaVar ? "Güncelle" : "Kaydet"} webStyle={style} />
handleSignature = signature => { console.log("Signature:" + signature) };
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.