How to check if iPhone supports CDMA or GSM
#include <sys/types.h>
#include <sys/sysctl.h>
NSString* machine () {
size_t size;
// Set 'oldp' parameter to NULL to get the size of the data
// returned so we can allocate appropriate amount of space
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
// Allocate the space to store name
char *name = malloc(size);
// Get the platform name
sysctlbyname("hw.machine", name, &size, NULL, 0);
// Place name into a string
NSString *machineid = [NSString stringWithUTF8String:name];
// Done with this
free(name);
return machineid;
}
#include <sys/types.h>
#include <sys/sysctl.h>
NSString* machine () {
size_t size;
// Set 'oldp' parameter to NULL to get the size of the data
// returned so we can allocate appropriate amount of space
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
// Allocate the space to store name
char *name = malloc(size);
// Get the platform name
sysctlbyname("hw.machine", name, &size, NULL, 0);
// Place name into a string
NSString *machineid = [NSString stringWithUTF8String:name];
// Done with this
free(name);
return machineid;
}
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.