Is it possible in flutter to get ID of an iPhone device to verify it's the same device?

733 Views Asked by At

I would like to verify that my App working on the same device.

Below is a description of the process:

  1. I read the ID from device on SignUp and store it on cloud DB.
  2. Each SignIn (email + Password) read again the ID and compare to ID from DB.
  3. If they are not equal -> exit

The problem is that after upgrade App version the device ID is not the same!

I tried some plugins they have the same status.

Any idea to verify its the same device, without SMS verification?

1

There are 1 best solutions below

2
Sujan Gainju On

Have you tried Device Info Plus plugin?

You can get the current device information from within the Flutter application

Example

import 'package:device_info_plus/device_info_plus.dart';
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();

AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
print('Android ID ${androidInfo.androidId}');

IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
print('Ios ID ${iosInfo.identifierForVendor}');