1

I write a custom iOS swift framework in Xcode 6.3 and using Cocoapods as a dependency tool. I use some objective-c modules, ex. AFNetworking, FMDB... But when I take my .framework to other apps, they say:

ld: framework not found FMDB for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I run the unittests of my framework well, but cannot build it with my app which using my custom framework. I guess it's the issue from objective-c module I use in my framework. But I don't know how to set it in the right way. I provide my Podfile as follow:

use_frameworks!
link_with 'bdilogger', 'bdiloggerTests'
pod 'ProtocolBuffers-Swift'
pod 'FMDB', :git => 'https://github.com/robertmryan/fmdb.git'
pod "AFNetworking"

BTW, I find my .framework from Debug-iphonesimulator under derivedData, cause I didn't have a developer now so that I cannot build an iOS device version. How can I resolve this issue? Thanks for answering a lot.

James Fu
  • 444
  • 1
  • 8
  • 21
  • See [this](http://stackoverflow.com/questions/29634466/how-to-export-fat-cocoa-touch-framework-for-simulator-and-device) answer. – izerik Jul 07 '16 at 19:45
  • I wrote an extensive guide on how to publish a universal binary iOS framework using CocoaPods: https://eladnava.com/publish-a-universal-binary-ios-framework-in-swift-using-cocoapods/ – Elad Nava Oct 19 '16 at 08:25

0 Answers0