SwiftyJSON import errors with Cocoapods

I saw how SwiftyJSON worked in a third-party project and wanted to transfer it to my main project. After using Cocoapods to install SwiftyJSON and opening xcworkspace (my main project now), I went to add my code: let jsonBIG = JSON(data: data2) and received the error message "Using an unresolved JSON identifier". I researched and found a solution saying to add import SwiftyJSON at the top of every file that uses it. When I do this, I get the error message โ€œThere is no such moduleโ€ SwiftyJSON. โ€I looked and tried these things, and nothing worked:

  • cleaning and construction project
  • folder to clean the assembly
  • rerunning pod install (with Xcode fully enclosed)
  • adding SwiftyJSON.framework to related structures and libraries
  • remote xcworkspace file and reinstall pod
  • checked that my debug and project release configuration points to the configurations generated by the pod installation

I looked at everything I could find in this thread on Google and StackOverflow, and nothing works. I know this is not a Cocoapods problem because I got SwiftyJSON to work on one of my other projects. Help?

edit: Maybe it matters? In my side project (where SwiftyJSON works), next to the wireframe is a yellow toolbar / frame icon: enter image description here

But in my new project, where I am trying to get SwiftyJSON to work, it is just a white library icon, for example: enter image description here

Despite the fact that when I go to add the framework, it shows a yellow toolbar / frame icon: enter image description here

+5
source share
1 answer

It turns out that in my project other errors were fixed that blocked SwiftyJSON from import. As soon as I fixed the other errors, everything worked as expected.

0
source

Source: https://habr.com/ru/post/1242223/


All Articles