Skip to content

Conversation

brandonzalcman
Copy link

Migrated to using expo clipboard to resolve null getString from clipboard.

Issue was found if phone did not have a SIM card and therefore did not receive a SMS, the clipboard would return null and break. This fixes as it allows null, so the user can type the code if there is none, or auto paste if they receive.

import React, { Component } from 'react'
import { View, TextInput, TouchableWithoutFeedback, Keyboard, Platform, I18nManager, EmitterSubscription, } from 'react-native'
import Clipboard from '@react-native-community/clipboard';
import * as Clipboard from 'expo-clipboard';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be best if you used @react-native-clipboard/clipboard instead.

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

Successfully merging this pull request may close these issues.

2 participants