如果您正在创建一个不会提交到应用商店的应用程序,您可以查看 Erica Sadun's UIDevice Extensions,它使用了 IOKit.framework。[[UIDevice currentDevice] serialnumber]