There are no public (i.e. approved by Apple) ways to identify device across wipes. Both identifierForVendor
and advertisingIdentifier
will change if device is wiped/restored.
Services like TestFlight are able to identify devices because they install special configuration profiles that give some extra abilities to them, such as getting actual UDID.
If you're not targeting AppStore (i.e. trying to do this from AdHoc app or on jailbroken device) then there are ways to achieve this with private APIs.