2014-02-26 2 views
2

코드를 통해 (Settings->General->About->Model) 장치 모델을 가져오고 싶습니다. 내가 사용 :iOS에서 기기 모델을 얻는 방법은 무엇입니까?

NSString* model=[[UIDevice currentDevice] model]; 

위의 코드는 "iPhone"을 반환합니다. 하지만 (Settings->General->About->Model)에 표시된 장치 모델 값을 가져와야합니다. 내 아이폰의 예를 들어 그 덕분에

enter image description here

답변

0
NSString *platform = [UIDevice currentDevice].model; 

NSLog(@"[UIDevice currentDevice].model: %@",platform); 
NSLog(@"[UIDevice currentDevice].description: %@",[UIDevice currentDevice].description); 
NSLog(@"[UIDevice currentDevice].localizedModel: %@",[UIDevice currentDevice].localizedModel); 
NSLog(@"[UIDevice currentDevice].name: %@",[UIDevice currentDevice].name); 
NSLog(@"[UIDevice currentDevice].systemVersion: %@",[UIDevice currentDevice].systemVersion); 
NSLog(@"[UIDevice currentDevice].systemName: %@",[UIDevice currentDevice].systemName); 
+1

+1 간단한 대답. – Popeye

+2

. MD128HN/A가. 첨부 된 스냅 샷을 참조하시기 바랍니다 "입니다 그러나 이것은 정답이 아니다. 나는 값 I를 인쇄하려면 스냅 샷을 반올림하여 스냅 샷을 확인하십시오. –

관련 문제