Flutter-why uuid change after uninstall and install apps in ios

Viewed 460

I am using device_info_plus package of flutter to get uuid of a phone, but every time I do uninstall apps and then install it again the uuid changes. it happens in ios device

Is there a way to get uniq id of a phone?

Here is part of the code when I am using device_info_plus to get uuid user

_readIosDeviceInfoRegis(IosDeviceInfo data) =>
      data.identifierForVendor.toString();
1 Answers

Unfortunately this is a known issue on the plugin. You can check the link below for more information.

https://github.com/fluttercommunity/plus_plugins/issues/447

As an alternative, you can actually use flutter_udid package. This will create consistent uuids.

import 'package:flutter_udid/flutter_udid.dart';
String udid = await FlutterUdid.consistentUdid;
Related