David Bin
David Bin

Reputation: 1

XCode Objective-C Shell Script Command

I have a custom script that will be bundled (or compiled) in my application that would normally take an argument such as:

# command argument

How do I call it (with the argument) when the application starts and have it continue running in the background until the application quits?

Upvotes: 0

Views: 356

Answers (1)

v1Axvw
v1Axvw

Reputation: 3054

If it's Mac OS X you can use an NSThread. In that thread you can launch the task with NSTask.

If you're on iOS you can still use NSThread but you'll need a replacement for NSTask. The code in my answer here can be used on iOS.

Upvotes: 1

Related Questions