Guest User

Untitled

a guest
Jun 21st, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. /*
  2. Platforms
  3. iPhone1,1 -> iPhone 1G
  4. iPhone1,2 -> iPhone 3G
  5. iPod1,1 -> iPod touch 1G
  6. iPod2,1 -> iPod touch 2G
  7. */
  8.  
  9. size_t size;
  10. sysctlbyname("hw.machine", NULL, &size, NULL, 0);
  11. char *machine = malloc(size);
  12. sysctlbyname("hw.machine", machine, &size, NULL, 0);
  13. NSString *platform = [NSString stringWithCString:machine encoding: NSUTF8StringEncoding];
  14. free(machine);
Add Comment
Please, Sign In to add comment