0

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?

1 Answers1

1

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.

Community
  • 1
  • 1
v1Axvw
  • 3,054
  • 3
  • 26
  • 40