owen gerig
owen gerig

Reputation: 6172

cocoa pods not working

I have a newly created project, which I used

pod init

on to initialize cocoa pods

Im adding a single pod (TCPickerView ) to it and trying to use it but getting errors

podfile:

    # Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'Symphony' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'TCPickerView'

  # Pods for Symphony

  target 'SymphonyTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'SymphonyUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

I do

pods install

then open the Symphony.xcworkspace file and build

Then I add the example code from the TCPickerView site (see second screenshot which shows code and errors).

screenshot showing the pods library is included in the Symphony project enter image description here

screenshot with code and error enter image description here

Upvotes: 0

Views: 660

Answers (2)

AamirR
AamirR

Reputation: 12198

There is no problem with your podfile, I tried it works, I guess you are missing import TCPickerView

It goes right after import UIKit in class ViewController

Upvotes: 1

Abhishek Thapliyal
Abhishek Thapliyal

Reputation: 3708

Can you update your pod file

    platform :ios, '9.0'
    use_frameworks!

    target 'Symphony' do

      pod 'TCPickerView'

      target 'SymphonyTests' do
        inherit! :search_paths
        # Pods for testing
      end

      target 'SymphonyUITests' do
        inherit! :search_paths
        # Pods for testing
      end

end

and try like this and reinstall pods again : pod install

Usage: import TCPickerView

Upvotes: 1

Related Questions