_reactNativeDeviceInfo.default.getUniqueID is not a function
Bug
_reactNativeDeviceInfo.default.getUniqueID is not a function
Library version: 3.0.0
Steps To Reproduce
just use DeviceInfo.getUniqueID() in your app
Workaround
Downgrading:
yarn add [email protected]
The name of the method changed, please see the migration guide https://github.com/react-native-community/react-native-device-info/wiki/V2-to-V3-Migration-Guide
@mikehardy Still facing issue. "react-native-device-info": "2.3.2",
That version is old and I will not troubleshoot it, sorry. The migration guide and the docs contain how to do it for the current release. If you need information on older releases you will have to ask github to show you the code for older releases then look at the docs https://github.com/react-native-community/react-native-device-info/tree/v2.3.2
you can use getUniqueId instead of getUniqueID
Try this
import DeviceInfo from 'react-native-device-info'; constructor(props) { super(props); this.state = { deviceId:'' }; } getId() { var id = DeviceInfo.getUniqueId(); this.setState({ deviceId: id, }); console.log("Device Id",this.state.deviceId) } Thanks G.Neeraja
On Thu, Nov 28, 2019 at 5:24 PM Mike Rodham [email protected] wrote:
Still getting the same issue ^5.3.1, calling DeviceInfo.getUniqueId().then(uid => info.uid = uid)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/react-native-community/react-native-device-info/issues/785?email_source=notifications&email_token=AITEOFPSZIKCMOK3Q5RKH3LQV6WPBA5CNFSM4IWUP532YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFMMEKY#issuecomment-559465003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITEOFOK2TEHNMRTHKQ3F2DQV6WPBANCNFSM4IWUP53Q .
you can use getUniqueId instead of getUniqueID
This work for me!!
Use getUniqueId instead of getUniqueID . It will work.