Say you have the name of an application, Mail.app, how do you programmatically obtain com.apple.mail from the application name?
Say you have the name of an application, Mail.app , how do you programmatically
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The following method will return an application’s Bundle Identifier for a named application:
For Mail you can call the method like so:
appIDnow containscom.apple.mailSwift 5.1
Deprecation
The
fullPathForApplication:/fullPath(forApplication:)method has been deprecated in macOS 10.15 – it is unclear what the answer is going forward.