Swift Get Iphone Model
Click the phone icon and you ll see your device s serial number displayed right below your phone number.
Swift get iphone model. Select swift file and click next. Uidevice current model gives you a model whether you have an iphone ipad uidevice current name gives you a name identifying the device. On an iphone 8 or later to find the model number remove the sim tray and look in the sim tray slot.
Use a uidevice object to get information about the device such as assigned name device model and operating system name and version. Efe udin november 22 2020. It is a regular practice for phone makers to terminate the release of regular updates to older models.
If you slightly customize this code you can use it to determine if your app runs on iphone or ipad for example. The model number is on the upper side the side with the display. On an iphone 7 or earlier an ipad or an ipod touch find the model number on the back of your device.
Make sure that you re in a place with bright light overhead. The second way is getting make and model using. At the top of the dialog that appears select ios.
Let modelname uidevice current model let name uidevice current name print modelname iphone print name iphone xr. Jsonexport is a desktop application which enables you to export json objects as model classes r swift get strong typed autocompleted resources like images fonts and segues in swift projects flex an in app debugging and exploration tool for ios. There are two things we will need to do.
To create a new data model class choose file new file or press command n. Connect your iphone to your mac. Create uidevice extension which will return the model of current device uidevice current modelname to get the model of current ios device.