If you want to get the bundle id of the apps installed in your iPhone which is connected to a Mac OS system, then simply
brew install ideviceinstaller
ideviceinstaller -l
This will list all the installed apps on the connected iOS device along with their bundle IDs