This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension UIDevice { | |
/** | |
Try to get the username from the device name using common knows | |
default device names format. | |
- copyright: Owen Godfrey on [StackOverflow](http://stackoverflow.com/questions/8261961/better-way-to-get-the-users-name-from-device) | |
- remark: Original regexpr improved to support custom name with model included eg. `<username>'s iPhone 6S` |