1

How does one invoke a command line tool from an app? I'd like to package the app with the command line tool and be able to launch it when the app launches.

When I try to use

func openCommandLineTool() { NSWorkspace.shared.open(URL(fileURLWithPath: "/filepath/")) } 

It tells me the application does not have permission to launch the command line tool.

My goal is to have an app that only launches the command line tool. How can I build this command line tool into the app? Is it possible?

1

1 Answer 1

2

I solved this by going to the .entitlements file within Xcode and selecting 'NO' for both 'App Sandbox' and 'com.apple.security.files.user'.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.