2

What is the simplest way to import code into a command line target ? Ideally, a bundle, such as the PrettyColors framework, for instance.

Xcode Version 8.2.1 (8C1002)

This question was asked 7 years ago and I was hoping Apple have since made some improvements.

EDIT: What I mean by command line target is an XCode command line tool executable template...

enter image description here

Community
  • 1
  • 1
  • 1
    You could use the Swift Package Manager. – Palle Feb 26 '17 at 12:05
  • Oh really @Palle ? Any special steps required for command line targets ? –  Feb 26 '17 at 12:07
  • No, just create your project with `swift package init --type executable` and then add your dependencies to the Package.swift file. You can also generate an Xcode Project using `swift package generate-xcodeproj` – Palle Feb 26 '17 at 12:33
  • If the Swift Package Manager does work, why not use it? Otherwise you still need to follow the instructions from the answer to the original question. – Palle Feb 28 '17 at 08:28
  • @Palle I want the IDE environment –  Feb 28 '17 at 08:51
  • Then use `swift package generate-xcodeproj` and you have your Xcode project. – Palle Feb 28 '17 at 09:34
  • @Palle no way! very cool. –  Feb 28 '17 at 09:36

0 Answers0