Static lib with CocoaPods dependencies

1k Views Asked by At

I'm following this tutorial in order to create an iOS framework (in order to support older than iOS8). It all went just fine.

The problem started when I made a step forward and tried to use 'Cocoapods' to get 3rd party libs which my framework is depended on.

When trying to build the aggregate target, I get the following error:

Libtool /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos/libmyFramework.a normal armv7
    cd /Users/me/Dev/testFrameworkJverkoey
    export IPHONEOS_DEPLOYMENT_TARGET=8.1
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/Users/me/.rvm/gems/ruby-2.1.1/bin:/Users/me/.rvm/gems/ruby-2.1.1@global/bin:/Users/me/.rvm/rubies/ruby-2.1.1/bin:/Users/me/.rvm/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Library/PostgreSQL/9.2/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/CrossPack-AVR/bin:/usr/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos -filelist /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Intermediates/testFrameworkJverkoey.build/Debug-iphoneos/myFramework.build/Objects-normal/armv7/myFramework.LinkFileList -ObjC -ObjC -lPods-AFNetworking -lPods-RestKit -lPods-SOCKit -lPods-TransitionKit -framework CFNetwork -framework CoreData -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -lPods -o /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos/libmyFramework.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC -ObjC 
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-AFNetworking
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-AFNetworking is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-RestKit
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-RestKit is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-SOCKit
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-SOCKit is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-TransitionKit
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-TransitionKit is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods is not an object file (not allowed in a library)

** BUILD FAILED **


The following build commands failed:
    Libtool /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos/libmyFramework.a normal armv7
(1 failure)
0

There are 0 best solutions below