react-native-pin-code icon indicating copy to clipboard operation
react-native-pin-code copied to clipboard

Copy from text IOS not working

Open hadare1 opened this issue 6 years ago • 15 comments

Hi , when I try to use the native "copy from text" in IOS only the first number is copied to the first code segment .

Is there a way to fix this?

IMG_9095

IMG_9096

hadare1 avatar Jun 11 '19 07:06 hadare1

Hello @hadare1 ,

This should be fixed in V0.5.0 : https://github.com/gkueny/react-native-pin-code/releases/tag/v0.5.0

Which version do you use ?

gkueny avatar Jun 11 '19 07:06 gkueny

"react-native-pin-code": "^0.5.3",

hadare1 avatar Jun 11 '19 07:06 hadare1

I will check your issue as soon as possible :)

Can you give me :

  • IOS version
  • An exemple of how you use PinCode component

gkueny avatar Jun 11 '19 07:06 gkueny

IOS Version is 12.2

         <CodePin
                        ref={ref => (this.ref = ref)}
                        autoFocusFirst
                        number={6}
                        checkPinCode={(code, callback) => callback(this.confirmCode(code))}
                        success={this.onSuccess}
                        keyboardType="numeric"
                        error={"The SMS passcode you have entered is incorrect"}
                        containerStyle={{paddingLeft: 0}}
                        errorStyle={{textAlign: 'left'}}
                        pinStyle={{
                            marginLeft: 0,
                            fontSize: 20,
                            height: getStyleSize(20),
                            backgroundColor: '#FFFFFF',
                            shadowOpacity: 0,
                            borderBottomWidth: 0.5
                        }}
                        text={''}
                        oneTimeCode
                    />

hadare1 avatar Jun 11 '19 07:06 hadare1

@hadare1 can you try with master branch ?

"react-native-pin-code": "git+ssh://[email protected]/gkueny/react-native-pin-code.git"

gkueny avatar Jun 11 '19 12:06 gkueny

when try to install I get this error :

npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/gkueny/react-native-pin-code.git npm ERR! npm ERR! Host key verification failed. npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists. npm ERR! npm ERR! exited with error code: 128

hadare1 avatar Jun 11 '19 13:06 hadare1

maybe : npm i gkueny/react-native-pin-code#master --save

gkueny avatar Jun 11 '19 13:06 gkueny

still the same result

hadare1 avatar Jun 11 '19 14:06 hadare1

Okey, I publish a beta version, this should work : npm i react-native-pin-code@beta

gkueny avatar Jun 11 '19 15:06 gkueny

I tried to remove node_modules and reinstall with npm i react-native-pin-code@beta but still this issue is not resolved. i tried to have only this component in the layout by itself and still it tries to copy the entire text to the first digit segment.

any thought?

hadare1 avatar Jun 11 '19 16:06 hadare1

mmmmh no idea for now, Your case is supposed to be supported (see https://github.com/gkueny/react-native-pin-code/issues/12)

I'll try again to reproduce , but I didn't succeed today 😞

gkueny avatar Jun 11 '19 16:06 gkueny

Ok, I have reproduced 😄

gkueny avatar Jun 11 '19 17:06 gkueny

great , please update me when you have a solution :)

hadare1 avatar Jun 11 '19 17:06 hadare1

Ok, I've find the issue. For now it's impossible to use react-native-pin-code and oneTimeCode.

I have to rewrite my component. I think to be able to find a solution in the end of the week.

Sorry for the inconvenience

gkueny avatar Jun 11 '19 17:06 gkueny

Ok, please mark this as closed so I'll be notified.

Thanks

hadare1 avatar Jun 11 '19 17:06 hadare1