I have a problem integrating AFNetworking in my Swift Dynamic Library:
Here is what I have done:
Modify Podfile: Here is the content of the podfile, and execute (pod install)
target 'MyFramework' do
use_frameworks!
pod 'AFNetworking' => '~>2.0'
end
Create sample swift file "MyLibrary" with 1 method and property.
Error:
ld: framework not found AFNetworking for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
You dragged the framework you've built manually into the app project. This way Xcode won't know that it also needs AFNetworking
as an additional dependency.
You have to use CocoaPods instead to add your framework to the app. This way you can declare AFNetworking
as a dependency of your framework in it's .podspec
file. CocoaPods will then link AFNetworking
to the app.
See