0

I tried install some podfile, but I failed. failed mesaage is

[!] Unable to find a specification for XLPagerTabStrip (~> 5.0)

so I tried pod repo update --verbose

and then...I can't build my app

all podfile have error

The file “...” couldn’t be opened because there is no such file.

so, I tried this but still I can't build :(

How can I solve it?

my pod files are AFNetworking, Alamofire, SlideMenuControllerSwift, and SwiftyJSON

Community
  • 1
  • 1
Lucy Jeong
  • 320
  • 7
  • 21

1 Answers1

3

Try these steps in a fresh new project:

  • Open your terminal
  • Go to your project folder
  • Tap pod init --> This will generate a Podfile
  • Then tap vi Podfile --> This will open your PodFile in the terminal (or you can open the Podfile in xcode by taping open -a Xcode Podfile)
  • Do as they said in the link that you provided but add the name of your app's target
  • It worked fine when I just put 'Alamofire' instead of 'Alamofire', '~> 1.2'

     platform :ios, '8.0'
     use_frameworks!
    
     target 'TheNameOfYourTarget' do
       pod 'Alamofire'
     end
    
  • After that save your file by pressing Esc, then :wq (to save your file)

  • Tap pod install in your terminal
  • Don't forget to close your current Xcode project (YourProject.xcodeproj)
  • and instead you have to open YourProject.xcworkspace, in order for the pod to work.
  • And finally don't forget to add the 'import Alamofire' in the ViewController where you want to use the pod

Try it out and let me know if it worked. (I just did the test and everything worked fine)

AziCode
  • 2,510
  • 6
  • 27
  • 53