Checking Device Info in ios

#include <sys/types.h>
#include <sys/sysctl.h>
- (NSString *)machineInfo
{
    NSString *device;
    size_t size;
    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
    char *name = malloc(size);
    sysctlbyname("hw.machine", name, &size, NULL, 0);
    device = [NSString stringWithUTF8String:name];
    free(name);
    return device;
}

Comments

Popular posts from this blog

How to set background color of navigation bar in iPhone

Some Interactive tips to take input form GUI Dialogs