Posts

Showing posts with the label Cocoapods

CocoaPods Install Issue

Answer : I had the same issue before. I fixed it by putting the following lines in the terminal: cd ~/.cocoapods/repos rm -rf master pod setup You need reinstall cocoapods: so sudo gem uninstall cocoapods sudo gem install cocoapods pod setup I was facing the same issue. I resolved the issue by running the following commands on the same path: rm -rf ~/.cocoapods/repos/trunk/ pod install

CocoaPods - Use Specific Pod Version

Answer : In your Podfile: pod 'AFNetworking', '1.2.0' Check 'Get started' at http://cocoapods.org Once this is done, you can then issue a pod update in the terminal for the change to take place. Of course, this needs to be done from your project's top level folder. If the update does not occur, edit your Podfile.lock file and change the AFNetworking version # to something less than what it is and issue a pod update in the terminal again. This tells CocoaPods that you have a different version installed and that it must update. Here, below mentions all possible ways to install pod with use cases. To install the latest pod version , omit the version number after pod name. pod 'Alamofire' To install specific pod version, specify pod version after pod name. pod 'Alamofire', '5.0.0' Besides no version, or a specific one, it is also possible to use logical operators: '> 0.1' Any version highe...

Cannot Install Cocoapods - No Podfile Found In The Project Directory

Answer : Steps to add CocoaPods to manage dependencies in your project: sudo gem install cocoapods -> This installs CocoaPods as a piece of software on your machine. Go to the root of your project directory and execute pod init -> This will add a base Podfile to your project. Add the external dependencies that you have to this Podfile by editing it. Run pod install which will fetch all the external dependencies mentioned by you, and associate it with a .xcworkspace file of your project. This .xcworkspace file will be generated for you if you already do not have one. From here on, you should use .xcworkspace file instead of .xcproject / .xcodeproj . Example Podfile Syntax: target 'MyApp' do pod 'AFNetworking', '~> 3.0' end Where AFNetworking is the pod and 3.0 is the specific version that I want to install. Documentation: Using CocoaPods If you want to add a library from GitHub to your own project, after installing gems, ...