Dilshan
Dilshan

Reputation: 3221

Accessing iPhone info from SDK

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.

Upvotes: 1

Views: 383

Answers (1)

RupertP
RupertP

Reputation: 1329

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.)

Upvotes: 1

Related Questions