1

I need to fetch device info from iPhone. I went through this link and find out the way to fetch the device platform.

Determine device (iPhone, iPod Touch) with iPhone SDK

In UIDeviceHardware it has included sys/types.h and sys/sysctl.h and it has used some methods to access that. So I want to know whether this is accepted in the app store as this uses sys imports and sysctlbyname methods. I want to make sure this approach is correct.

Thank you.

Community
  • 1
  • 1
Dilshan
  • 3,231
  • 4
  • 39
  • 50

1 Answers1

1

You should look into UIDevice, since UIDeviceHardware seems to be a private API (no info in the documentation).

Generally it's recommended not to check for hardware models (e.g. iPhone 3GS / 4G / iPad) but for hardware features that you require (compass, camera, etc.)

RupertP
  • 1,329
  • 1
  • 8
  • 7
  • Thanks RupertP. So is there any other class to get iPhone specific information like above. I need to fetch UDID, serial no, IMEI etc. But the UIDevice it only limits to certain. I need to get more data than UIDevice. – Dilshan Nov 08 '10 at 09:54
  • 1
    As far as I know, you can not retrieve the serial #, IMEI, etc. without using private API calls. UDID is possible through UIDevice. What would you need all this information for? Is the UDID not enough? – RupertP Nov 08 '10 at 10:40
  • Thanks. This is for client server communication. Using those I am going to create encrypted identifier which is a requirement for my application. So other than UIDevice is there any way to retrieve device info without using private APIs? – Dilshan Nov 08 '10 at 13:13