Mixing Swift and Objective C in Dependencies (cocoapods) that work as framework as well as static library

自作多情 提交于 2019-12-11 06:38:29

问题


Is it possible to have a pod that can work as framework as well as a static library (depending on the App that want's to use it)?

Basically the problem is that Module-Swift.h needs to be included with

#import <Module/Module-Swift.h>

when used as a framework and

#import "Module-Swift.h"

when used as a static library.

I haven't found a way to tell the Pod projects where to look to find the header if it can't find the variant I used.

If you want to see the problem in action feel free to check out https://github.com/cweymann/MixedLog-Demo/tree/as_framework (run setup.sh in the Example subfolder)

Any ideas would be appreciated!

来源:https://stackoverflow.com/questions/57256326/mixing-swift-and-objective-c-in-dependencies-cocoapods-that-work-as-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!