How do I detect a dual core CPU on iOS?

前端 未结 6 523
臣服心动
臣服心动 2020-12-08 14:48

My app uses an NSOperationQueue to cache thumbnail images in a background thread. On the iPad2 I can push the concurrent task count limit up to 5 or 6, but on s

6条回答
  •  青春惊慌失措
    2020-12-08 15:36

    Among other things, you can get that information through a system call...

    NSDictionary dictionaryWithObjectsAndKeys:
        [self machineType],@"MachineType",
        [self humanMachineType],@"HumanMachineType",
        [self powerPCTypeString],@"ProcessorType",
        [NSNumber numberWithLong:
                         [self processorClockSpeed]],
                             @"ProcessorClockSpeed",
        [NSNumber numberWithLong:
                         [self processorClockSpeedInMHz]],
                             @"ProcessorClockSpeedInMHz",
        [NSNumber numberWithInt:[self countProcessors]],
                         @"CountProcessors",
        [self computerName],@"ComputerName",
        [self computerSerialNumber],@"ComputerSerialNumber",
        [self operatingSystemString],@"OperatingSystem",
        [self systemVersionString],@"SystemVersion",        
        nil];
    

    Here's the reference... http://cocoadev.com/HowToGetHardwareAndNetworkInfo

提交回复
热议问题