I have to use third-party library in my project. And I want to add it to the project via cocoapods. I create private repository with foo.a, some headers and a podspec. The podspec looks like this:
Pod::Spec.new do |s|
s.name = 'FooClient'
s.version = '1.0'
s.summary = 'Foo client '
s.source = { :git => 'https://github.com/Zhorkov023/FooClient' }
s.license = 'MIT'
s.source_files = "FooClientLibrary/*.h"
s.ios.vendored_library = 'FooClientLibrary/libFooClient.a'
s.platform = :ios, '6.0'
s.requires_arc = true
s.frameworks = 'Foundation'
end
But I get an error at Linker:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_FooSession", referenced from: objc-class-ref in FooClientSingleton.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like my project doesn't know about libFooClient.a. Because if I add library by drag and drop everything is ok. I don't understand why.
Please help me.
I have resolved this issue.
To fix my problem I have to add string $(inherited) in Targets -> Build Settings -> Linking -> Other Linking Flags
Thanks all!