Answer the question
In order to leave comments, you need to log in
What am I doing wrong when connecting frameworks via Cocoapods in iOS?
Hello. I'm trying to connect third-party libraries to my iOS project via Cocoapods.
Here is the contents of the Podfile
platform :ios, "7.0"
target 'MyApp' do
pod 'Fabric'
pod 'Crashlytics'
pod 'SDWebImage', '~> 3.7'
pod 'SVProgressHUD', '~> 1.1'
pod 'TPKeyboardAvoiding', '~> 1.2'
end
Did everything according to the instructions. First pod init, then pod install. Judging by the logs on the command line, the installation was successful. Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Crashlytics", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_Fabric", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Logically. After all, the libraries are not connected. I click on the project file, select the appropriate Target, on the General tab, go to the "Linked Frameworks and Libraries" group and try to add the necessary frameworks. They are not in the list, so I press the "Add another .." button and indicate the path to them. The frameworks are located in the folders .\Pods\Fabric and .\Pods\Crashlytics (The path is relative to the project folder). ld: framework not found Fabric
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I go to the Target of my project, on the tab "Build Settings" I look in the group "Search Paths" settings for "Framework Search Paths". For both Debug and Release there are the following lines: Answer the question
In order to leave comments, you need to log in
Apparently you are doing everything wrong )) took the time, although I already have 0-50 and took an empty project on ObjC, Xcode 7.0.1, El Captain and added your entire Podfile, only for me it looks like
source ' https:// github.com/CocoaPods/Specs.git '
platform :ios, "7.0"
target 'testNewCoreData' do
pod 'Fabric'
pod 'Crashlytics'
pod 'SDWebImage', '~> 3.7'
pod 'SVProgressHUD', '~> 1.1'
pod 'TPKeyboardAvoiding', '~> 1.2'
end
then I had to do the standard
sudo gem install cocoapods
pod install
got the workspace going
I added the AppDelegate lines
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question