I want to use Python and atomac
module to trigger an application in macOS like following scripts:
atomac.launchAppByBundleID()
app_win = atomac.getAppRefByBundleId(app_bundle_ID)
But I don't know how to get the Bundle ID (app_bundle_ID
) of the application.
What is an iOS App Bundle ID ? Bundle ID is an identifier for each app published on App Store and set when creating an app. Every iOS application requires a bundle ID to work and it needs to be unique if the developer wants to publish it on App Store.
Open you project with XCode, select the top project item in the project navigator at the left. Then select TARGETS -> General. Bundle Identifier is found under Identity.
I use two methods to get the bundler ID:
osascript -e 'id of app "SomeApp"'
and
mdls -name kMDItemCFBundleIdentifier -r SomeApp.app
if you just need it to launch the app look in the app's info.plist file. the file is in the app bundle in the Contents directory. This works for a lot of apps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With