Libraries installed from Pods not working - ios

I have installed cocoa pods and added many libraries like the AFNetworking but nothing is getting invoked. I have set the Linked Frameworks and Libraries 'Status' as optional but getting nil reference for all the libraries. What am I doing wrong?

Steps to install Pods on your Xcode project
Open Terminal add this command or write cd and drag and drop folder direct to terminal
cd ~/Path/To/Folder/Containing/ShowTracker
pod init
Open PodFile from your Xcode project and add your framework
or you can direct open Xcode pod file using this command: open -a Xcode Podfile
Add frameworks
pod 'AFNetworking', '2.2.1'
pod 'IQKeyboardManager'
pod 'Facebook-iOS-SDK'
At last close window of Xcode Podfile and got o terminal and write this command
pod install
Hope this helps you..

Related

xcode9 not able to generate .xcworkspace file with cocoa pods

With xcode9 i am trying the install some libraries with cocoapods, but after running pod install .xcworkspace file is not generating, I have also tried to update cocoapods, but after updating the pods also .xcworkspace file is not generating.
Works fine for me using Xcode 9 if I follow these steps with Cocoapods version 1.1+
Create new Xcode project (let's say with the name of Cocoapods).
Follow the Xcode project location and pod init it will create Podfile
Open the Podfile using open -e Podfile add Libraries names and pod install
But in your case Podfile.lock is missing. I guess you should run pod deintegrate and pod install once again if still, you face the issue then you need to change the Cocoapods version.

Issue with CocoaPods

hi Iam new to iOS and i am trying to use CVCalender for custom calendar https://github.com/CVCalendar/CVCalendar#-cocoapods-
and i am try to install the cocoa pods but its getting error,
But i have muly cocopods in my file is these are use full or i need to delete these things as shown in image
can any one help me to how to install coacoa pods sucessfully and install cvcalender
after adding delegates also showing same error
1.Open terminal
sudo gem install cocoapods
2.Setup the cocoapods master repo
pod setup
download the master repo. The size is big approx 370.0MB
3.Create xcode project and select root directory in terminal.
cd "your XCode project root directory"
4.Then type
pod init
5.Then open your project's podfile by typing in terminal
open -a Xcode Podfile
6.Add your project's dependencies in open text podfile.
**for ex.** pod 'CVCalendar', '~> 1.5.2'
7.Then install pods into your project by typing in terminal
pod install
Now close your xcode project and open .xcworkspace xcode project file.
Happy Coding.
Also refer cocoapods link. https://cocoapods.org/

Cocoa Pod Setup for existing xcode project

I found these tutorials to create our own cocoapod:
https://guides.cocoapods.org/making/making-a-cocoapod.html
http://code.tutsplus.com/tutorials/creating-your-first-cocoapod--cms-24332
but for me none of them helps, as they create fresh xcode project using pod lib create. I have my own xcode project and I need to setup in that rather than create a fresh one.
1.Delete following files/folder that pod created.
2.Make sure your Podfile available.
3.Use this command:
pod install
Updated
If you didn't have installed pod in your project. Do like following:
1.Use pod setup in your project root folder.
2.Edit Podfile
3.Use this command:
pod install
Try to do like this:
1.Run the command on Terminal:- sudo gem install cocoapods
After successfully install CocoaPods
2.Go to that folder where your existing project is saved in your System.
3.After that Run the command for creating Pod file:- Touch podfile
4.After Creating Pod file run the next command:- Open podfile
It will open pod file and here Put the below line and save that file using command+S
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘8.0’
use_frameworks!
pod 'Alamofire', '~> 2.0.2’
5.After that run the final command in your Terminal:- pod install
It will take some time to install that file after that once install the all file close the xcode project and again open that project, click on the .xcworkspace extension file.

Cannot Install Cocoapods - No podfile found in the project directory

I downloaded a sample project to learn how to make a UIPageViewController, and I am trying to essentially fork that project and need to add a third-party library. Right now, it does not look like I have a .xcworkspace file in my project. When I try and install the cocoapods, I first run
sudo gem install cocoapods - in the specific project directory in my terminal
pod install - in that same directory
I am receiving an error in the terminal "No podfile found in the project directory."
Is this happening because I don't have a .xcworkspace file? Am I installing the podfile correctly?
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
Just posting for anyone that encountered this issue while working on a react native project.
sudo gem install cocoapods
this installs cocoa pods to your machine
cd projectDirectory cd into your project directory
cd ios cd into the ios directory of your project, is you list items that are in this folder, you would most likely see a podfile there.
pod install
If you want to add a library from GitHub to your own project, after installing gems, do firstly pod init look at from GitHub cocoapod description and then add it after target line in podfile.
Save and run "pod install".
It would be successfully added on your project.
Don't forget to call pod install in the Project folder of your project (not in the root).
Open a terminal, if you use VSCode, you can just run the following from the terminal
Do a cd <project_name> to your flutter project directory
Run cd iOS
Then run pod install

Cannot install third party library

I keep trying to add https://github.com/jessesquires/JSQMessagesViewController into my project but it keeps coming up with a linking error.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't know what I am doing wrong I can't seem to add the demo into a blank project and get it to work.
This is what I'm doing:
I download the zipfile which contains the demo project folder (not an entire xcode project, just the .h and .m files needed for the demo).
I open a blank xcode project and insert the demo project folder.
I delete the blank project's plist, storyboard, main and app delegate files.
From the terminal, I cd into the project and make a podfile that looks like this:
platform :ios, '7.0'
pod 'JSQMessagesViewController'
pod 'JSQSystemSoundPlayer'
I run pod install.
I open the project in its new workspace that has the pods and I try to run it.
It throws the linking error.
What step am I missing? I see on the GitHub installation process it says:
#import <JSQMessagesViewController/JSQMessages.h> // import all the things
but I don't know what that means. I figured it meant something about updating your headers seach path but when I look at that under Build Settings its already pointing to the header file in the pods.
Is there an obvious step I'm missing when adding a third party library?
I installed JSQMessagesViewController through cocoapods in my project, I did not get any errors successfully installed.Please try the following steps:
Open Terminal and navigate to the directory containing your project by using the cd command:
cd ~/Path/To/Folder/Containing/Project
Next enter this command: pod init
Type this command to open Podfile using Xcode for editing:open -a Xcode Podfile.
Copy and paste this line: pod 'JSQMessagesViewController', '6.1.3' and save it.
Type this command: pod install
This installs dependent libraries related to JSQMessagesViewController and JSQSystemSoundPlayer.
After this close the project and go to your project folder ,use the workspace intead of xcodespace : yourProject.xcworkspace. Hope this post might help you.
1.Open a brand new project from Xcode, do not delete anything.
2.cd ~/ROOT_PATH_OF_YOUR_PROJECT
3.Edit your Podfile if your already had one
Podfile
platform :ios, '7.0'
pod 'JSQMessagesViewController'
pod 'JSQSystemSoundPlayer'
4.run pod install
5.open yourproject.xcworkspace
6.Build

Resources