I have a problem integrating AFNetworking in my Swift Dynamic Library:
Here is what I have done:
- Create Xcode Project: ( Cocoa Touch Framework )
- Initialize Pod: ( pod init ) via Terminal
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.
- Import AFNetworking (import AFNetworking)
- Build, and the sample "MyFramework.framework" has been created.
- Create a new project file ( single application )
- Drag "MyFramework.framework" to the new created project
- Import MyLibrary: ( import MyLibrary ) in a viewcontroller class
- Build.
Error:
ld: framework not found AFNetworking for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)