Karan Sharma
12/18/2024, 11:04 AMUIDevice.currentDevice.model - This just gives iPhone
UIDevice.currentDevice.name - This is not accurate because user will most likely modify the name.
Ludovic
12/18/2024, 12:48 PMUIDevice
api.
I could recommend taking a look at libraires such as DeviceKit, but they rely on a call to uname
to get an identifier from which they try to determine the actual device model.
Meaning: every time a new device comes out, you would have to update the library and publish a new version of the app if you don't want to end up in the unknown case.