I have the following code to launch Address Book, now that works well, but is there a way I could launch this infront of the running application?
[[NSWorkspace sharedWorkspace] openFile:@"/Applications/Address Book.app" withApplication:nil];
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.
Try the NSWorkspace method:
Also note you should use
URLForApplicationWithBundleIdentifier:rather than a fixed path. This will work even if Address Book.app is moved in a future version of OS X, or the user moves it to a different folder.