You can use MobileDevice (private framework on OS X) or libimobiledevice to query lockdownd for a list of installed apps. Of course this only works from a PC host. Jailbroken apps can directly query lockdownd or traverse the filesystem if they would like to.