0

I have an OSX project (xcode plugin) and I want to use the ReactiveCocoa paradigms in it (PromiseKit andBrightFutures` are the other implementations of the same paradigms so I need to import at least one from these 3 frameworks/libraries).

The problem is it seems impossible to import them as compiled frameworks into my project because it is plugin. In my project I used dispatch_async and dispatch_after functions only but their nested blocks look awful.

The only solution I found is import one from these frameworks as sources but I don't know how to detach their code. So could anybody help with this trouble? Or maybe are there any other similar libraries which are already represented as source files only?

Vyachaslav Gerchicov
  • 2,317
  • 3
  • 23
  • 49

1 Answers1

0

Short Answer: Use a dependency manager like Cocoapods or Carthage.


Longer Answer: You can do it manually, but even if you don't want to use any of those, you can look at the .podspec file and see how it's supposed to be used. For example BrightFutures.podspec says:

s.source_files = 'BrightFutures/*.swift'

s.dependency 'Result', '0.6.0-beta.6'

That means that you need to import all the .swift files inside the BrightFutures folder, and that it won't work unless you also import the files from another project called Result.

But please, just let the tools do that for you. You'll be happier. :)

Community
  • 1
  • 1
NiñoScript
  • 4,523
  • 2
  • 27
  • 33