Creating framework that requires (depends on) another framework

前端 未结 1 1953
清歌不尽
清歌不尽 2021-02-14 02:06

I\'d like to create a framework using Cocoa Touch Framework Project in Swift. However, I\'m building this framework on top of another framework called RNCryptor, which is Object

相关标签:
1条回答
  • 2021-02-14 02:17

    Frameworks should never embed other frameworks directly. This leads to collisions if the importing project or any other framework also includes that framework. Instead, you need to tell your consumer that they also need to include your dependency. CocoaPods will do this for you automatically, so you should let it. (If you're having trouble with CocoaPods dependencies, you should ask a question about that and get it cleared up. The whole point of CocoaPods is to manage these kinds of things.)

    Note that I will be releasing the Swift version of RNCryptor into beta today (or tomorrow, but I really hope today). This version bridges to ObjC and will be the preferred version going forward. (The ObjC version will continue to be available of course for projects that cannot or don't want to include Swift.)

    0 讨论(0)
提交回复
热议问题