On iOS, the UDID is stored in Keychain with
kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly. This means it is available
only after the user has unlocked the device once after reboot, including later
background launches while the device is locked. Before the first unlock after
reboot, requesting the UDID throws a PlatformException.
Consistent Format
To get a consistent formatting on all platforms use:
Additionally, if a device has been updated to Android 8.0 through an OTA and
the app is reinstalled, the UDID may change as well due to security changes in
Android 8.0.
On rooted and jailbroken devices the ID can be changed, so please take this
into account. However, it should not be possible to identify as a different
device through random guessing because of the complexity of the ID.
Furthermore, the UDID may also change if there is a change in the app's signing
signature, for both iOS and Android. Ensure that you always use the same digital
signature to sign your app.
Flutter Resources
For help getting started with Flutter, view the online
documentation.
For help on editing plugin code, view the documentation.