react-native-device-info icon indicating copy to clipboard operation
react-native-device-info copied to clipboard

_reactNativeDeviceInfo.default.getUniqueID is not a function

Open Sleepful opened this issue 7 years ago • 7 comments

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]

Sleepful avatar Sep 13 '19 21:09 Sleepful

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 avatar Sep 14 '19 00:09 mikehardy

@mikehardy Still facing issue. "react-native-device-info": "2.3.2",

akhilsanker avatar Sep 26 '19 10:09 akhilsanker

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

mikehardy avatar Sep 26 '19 17:09 mikehardy

you can use getUniqueId instead of getUniqueID

NeerajaaG avatar Oct 18 '19 11:10 NeerajaaG

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 .

NeerajaaG avatar Nov 29 '19 06:11 NeerajaaG

you can use getUniqueId instead of getUniqueID

This work for me!!

alexsanderlauffer avatar May 01 '20 12:05 alexsanderlauffer

Use getUniqueId instead of getUniqueID . It will work.

dhruvkumarsood avatar Jul 15 '20 09:07 dhruvkumarsood