-1

I make a command line tool in xcode5.1.1 with c.But now I want to make one in xcode6 with swift. I was struck by the new command line tool project with swift!I know there is no main() function in swift,but I can't find any way to get the launch arguments.

Is there any way to get them?

Sagles
  • 3
  • 3

1 Answers1

0

See the linked question, there’s the answer How do I access program arguments in Swift?

import Foundation

let args = NSProcessInfo.processInfo().arguments;
println(args);
Community
  • 1
  • 1
noliv
  • 4,675
  • 1
  • 12
  • 3