this is the standard code:
#if ANDROID
string deviceID = Android.Provider.Settings.Secure.GetString(Platform.CurrentActivity.ContentResolver, Android.Provider.Settings.Secure.AndroidId);
#elif IOS
string deviceID = UIKit.UIDevice.CurrentDevice.IdentifierForVendor.ToString();
#endif
the android id is assigned when the device is first booted, and should remain for the life of the device.
apple is more privacy conscious, so the IOS version does not support your requirement. it is generated when your app is installed, and shared among your apps, but if they are all removed, then the id is removed. a new install will result in a new id.