How to get bundle id of iOS app - either using .ipa file or app installed on iphone

I also face similar situation, but I have bundle ID and app got installed into the real device. After starting the Appium with bundle ID, when I click the inspector, I get the following error.
App is not installed. Will try to install the app.
Cleaning up appium session
Error: Installing com.xxx.xxxx (dName.appName) failed at /Applications/Appium.app/Contents/Resources/node_modules/…

I’m not sure what is the issue. How could I debug more.? or some one has the steps to follow on this case.

Thanks.