2
votes

I am new to Swift, but I learned the basics. I wanted to import a framework but I ran into issues. I will now explain what steps I followed and what failed.

  1. I installed cocoapods by using terminal command: sudo gem install cocoapods
  2. I then navigated to my projects root directory with terminal then used command: pod init
  3. It created a podfile, and I edited it as I have shown below.

    platform :ios, '8.0' use_frameworks!

    target 'Testy' do

    end

    target 'TestyTests' do

    pod 'Kingfisher', '~> 1.8.1'

    end

    target 'TestyUITests' do

    pod 'Kingfisher', '~> 1.8.1'

    end

  4. I then closed xcode and started the project by clicking 'Testy.xcworkspace' file.

  5. At this point, I did not add any code, just built the project without issues, problems start here.
  6. When i try to import my framework and build, it gives the follow error:

    Cannot load underlying module for 'Kingfisher'

  7. So what might be the problem here? If you need additional info, ask me and I can provide.

1

1 Answers

1
votes

In your Podfile, you do not have "pod 'Kingfisher', '~> 1.8.1'" listed for the target "Testy".