Skip to content

Instantly share code, notes, and snippets.

@malcolmteas
malcolmteas / getDeviceModel.swift
Last active August 29, 2015 14:27
Get a more human-readable device model name. So get the "iPhone5,1" type format and translate it into "iPhone 5" or whatever.
/* Sample functions to use to get the machine name (aka device model) in iOS 8
Use this by copying these methods into your project in the appropriate place.
Clearly this is not an actual class file. Likely at some point I'll make
a UIDevice category that has this and other handy functions.
Malcolm Teas, August 2015 */
/**
Raw device model method