0

I have been trying to find a solution to this problem for hours. Every time I try to build my project, I get the same error:

ld: framework not found SwiftHTTP

I tried following the instructions in this question but to no avail.

Are there any ideas as to what else I may be doing wrong?

Community
  • 1
  • 1
scottysseus
  • 1,922
  • 3
  • 25
  • 50
  • so... has the framework been added to SwiftHTTP ? – Raptor Jan 20 '16 at 02:05
  • what exactly do you mean by that? – scottysseus Jan 20 '16 at 02:07
  • the error is self-explained. the framework cannot be found. Either it's missing, or the path is mis-configured. Did you use Cocoapods to install it? It's available in Cocoapods: https://cocoapods.org/?q=SwiftHTTP – Raptor Jan 20 '16 at 02:15
  • Yes, I used cocoapods to install the framework. A `SwiftHTTP` directory is in the `Pods` directory in my project, but I cannot find a `.framework` file anywhere – scottysseus Jan 20 '16 at 02:18
  • 1
    Last, did you open the `.xcworkspace` (instead of `.xcproject`)? – Raptor Jan 20 '16 at 02:23
  • Yes, I was not opening the `.xcworkspace` but even once I did that, my project still is not building – scottysseus Jan 20 '16 at 02:29
  • Thank you for that. I had forgotten that Xcode needs to be open via .xcworkspace when dealing with cocoapods. The build was still failing because I had borked all of the paths already trying to deal with the failures. I simply re-cloned my repo and now everything works. – scottysseus Jan 20 '16 at 02:45

1 Answers1

1

As mentioned in comments, OP accessed the project via .xcproject instead of .xcworkspace, thus the framework is not loading. To solve the problem (and restore to recommended settings by Cocoapods), follow the steps below:

  1. Close all Xcode project / workspace
  2. In Terminal, issue pod update in the Project folder to restore the settings
  3. After Cocoapods finished running, open the .xcworkspace and build the project
Raptor
  • 53,206
  • 45
  • 230
  • 366