- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get device make and model on iOS?
When we talk about the device make, we refer to the Phone manufacturer (e.g. Apple, Samsung, Nokia and so on) and device model is generally the specific product such as iPhone, iPad/TAB etc.
Any mobile devices will be categorized using make and model only.
Now let’s understand how do I get device make and model in iOS?
There are two ways to get make and model the first way is to directly open your iOS device, navigate to setting, tap on general and in the about section you can find the details of your iOS device
The second way is getting make and model using
Open Xcode → New Project and add the below code in ViewController’s viewDidLoad method.
let modelName = UIDevice.current.model let name = UIDevice.current.name print(modelName) // iPhone print(name) // iPhone XR
UIDevice.current.model, gives you a model whether you have an iPhone, iPad, UIDevice.current.name gives you a name identifying the device.
- How to get the Touch position on iOS device?
- How to detect iOS device UDID, Name, Version, Model by programmatically?
- How to detect which iOS version is running on the device?
- How to make a background 25% transparent on iOS
- How to get the touch position on android device?
- How to make an HTTP request on iOS App using Swift?
- How to lock & unlock the iOS device programmatically
- How to make an Android device vibrate?
- How do I load an image by URL on iOS device using Swift?
- How to make an HTTP POST request on iOS App using Swift?
- How to get and store Device ID in Android?
- How to make an Android device vibrate programmatically?
- How to make an alert dialog fill 50% of screen size on Android device?
- How to get the Touch position on an android device using kotlin?
- How to make dotted/dashed line in iOS?