---
title: "iOS获取当前系统的相关信息"
author: "landyer"
date: "2012-01-12T15:44:31Z"
tags: []
categories: ["移动开发"]
slug: "ios"
draft: false
lastmod: "2012-01-12T15:44:31Z"
id: 1343551
url: "https://landyer.iteye.com/blog/1343551"
---

NSLog(\[\[[UI](http://www.haogongju.net/tag/UI "UI")Device currentDevice] name]); // Name of the [phone](http://www.haogongju.net/tag/Phone "phone") as named by user

NSLog(\[\[UIDevice currentDevice] uniqueIdentifier]); // A GUID like str[in](http://www.haogongju.net/tag/in "in")g

NSLog(\[\[UIDevice currentDevice] systemName]); // "[iPhone](http://www.haogongju.net/tag/iPhone "iPhone") [OS](http://www.haogongju.net/tag/OS "OS")"

NSLog(\[\[UIDevice currentDevice] systemVersion]); // "2.2.1"

NSLog(\[\[UIDevice currentDevice] model]); // "iPh[one](http://www.haogongju.net/tag/one "one")" on both devices

NSLog(\[\[UIDevice currentDevice] localizedModel]); // "iPhone" on both devices

float version = \[\[\[UIDevice currentDevice] systemVersion] floatValue]; //获取版本号

if (version &gt;= sdk number)

{

}