如何在iOS中构建Cocoa触摸框架?
How to build a Cocoa touch framework in iOS?
我想在 iOS 中构建一个 Cocoa 触摸框架。我的框架名为 'MyFramework',它依赖于 'GoogleWebRTC'.
等第三方框架
我尝试通过 cocoa pods 添加它,也尝试将其拖到 MyFramework 项目中。但问题是当我将 MyFramework 导入任何其他项目时,它给出错误:
Module 'WebRTC' not found
我还看到 Apple 不鼓励伞形框架:
Why are umbrella frameworks discouraged?
然后:
我想了解如何包含此 GoogleWebRTC.framework 或任何其他第三方库。在 MyFramework 项目中并分发给其他人。
感谢您的帮助!
我的解决方案是我必须使用我的框架在应用程序中明确添加 GoogleWebRTC。
如果您的框架可以通过 pods 安装,那么您可以提及您的依赖第三方库。在 podspec 文件中如下:
s.ios.dependency 'dependent framework pod'
我想在 iOS 中构建一个 Cocoa 触摸框架。我的框架名为 'MyFramework',它依赖于 'GoogleWebRTC'.
等第三方框架我尝试通过 cocoa pods 添加它,也尝试将其拖到 MyFramework 项目中。但问题是当我将 MyFramework 导入任何其他项目时,它给出错误:
Module 'WebRTC' not found
我还看到 Apple 不鼓励伞形框架:
Why are umbrella frameworks discouraged?
然后:
我想了解如何包含此 GoogleWebRTC.framework 或任何其他第三方库。在 MyFramework 项目中并分发给其他人。
感谢您的帮助!
我的解决方案是我必须使用我的框架在应用程序中明确添加 GoogleWebRTC。
如果您的框架可以通过 pods 安装,那么您可以提及您的依赖第三方库。在 podspec 文件中如下:
s.ios.dependency 'dependent framework pod'