-2

I know it may sound like a strange question but i dont want to fall on this . I have read that if i use something that is not documented i can get rejected by Apple , To get iphone kind i use :

//get iphone kind
-(NSString*) machineName
{
    struct utsname systemInfo;
    uname(&systemInfo);

    return [NSString stringWithCString:systemInfo.machine
                              encoding:NSUTF8StringEncoding];
}

Can i use this ? The [UIDevice device] cant do this ,is there a better way ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Curnelious
  • 1
  • 16
  • 76
  • 150

1 Answers1

2

Why do you say this isn't documented? Type "uname" into the search field of the Documentation tab of the Xcode Organizer and you will be shown the man page for uname.

There are many C functions that are fully documented through "man pages". These are all perfectly safe to use in an iOS app.

I use the code you posted in several apps in the App Store. It's not an issue.

rmaddy
  • 314,917
  • 42
  • 532
  • 579