Better HN
topnewbestaskshowjobs
Log inSign up

Comment

by objclxt · 13y ago · 0 comments

It's a bit of a hack.

There is no way to get hold of a list of installed or runnings apps through the Cocoa APIs (this is in contrast to Android, where you can obtain finite information on apps right down to data consumption).

However, there is a way to obtain all current running processes, using the standard sysctl function[1]. This includes apps that are backgrounded but not terminated. If you are interested someone on StackOverflow has put together some sample code (I haven't verified it, but it looks like it should work)[2].

This is not as useful as it sounds though. You're not getting app metadata, just process names. The developers behind AppMap will presumably have set up a database populated with the most popular apps, but will need to keep this current as more apps come to market.

[1]: http://developer.apple.com/library/ios/#documentation/System...

[2]: http://stackoverflow.com/questions/10141067/running-apps-in-...

Comments
phoenixy13y ago
It's really interesting. Thanks for the detailed explanation. I always wondered if there's any way to do this.. And it's good to know that Apple is OK with this kind of hack.