iOS8: Custom Swift Framework accessing external framework written in Objective-C

前端 未结 3 1192
天涯浪人
天涯浪人 2021-01-05 00:58

I\'m trying to create a custom framework called CouchbaseKit (a new target in Xcode) in Swift. Inside my CouchbaseKit, I need to access Couc

3条回答
  •  囚心锁ツ
    2021-01-05 01:04

    Unfortunately Cocoapods 0.39 suffers from "Transitive Vendor Dynamic Libraries Unsupported" You'll see this with the newest couchbase-lite-ios release including the binary CouchbaseLite.framework. This unfortunately issue bit me so hard I had to refactor everything to use Carthage, and manually manage my frameworks in my final projects.

    Speaking of which the binary released CouchbaseLite.framework is simply missing a module map.

    Add one to: CouchbaseLite.framework/Modules/module.modulemap

    framework module CouchbaseLite {
      umbrella header "CouchbaseLite.h"
    
      export *
      module * { export * }
    }
    

    You will then be able to include this framework into a bridging header, and have your dynamic framework nest properly. But you might need to switch to building your CouchbaseKit.framework to using Carthage like I did.

提交回复
热议问题