You should look at the Mach host APIs, starting with <mach/host_info.h>. Do you want do this just for debugging? Or are you planning to leave this code in your shipping app?IMO this latter is a long-term compatibility concern. The philosophy of the iOS sandbox is that apps should only be able to get information about themselves, not about other apps or the system as a whole. Certain low-level APIs that were grandfathered in from OS X run counter to this philosophy. Over time the sandbox has a habit of catching up with these discrepancies. For example, in iOS 9 the sandbox prevents you from getting a [list of all processes on the system via sysctl]706]. While I don't have anything specific to say about the Mach host APIs, it's not hard to imagine them running afoul of the sandbox at some point in the future.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic:
App & System Services
SubTopic:
Core OS
Tags: