[英]iOS - How to manage dependencies of a framework during it's development using cocoapods?
I am currently developing an iOS framework (let's say MyFramework
) which internally uses 3rd party framework, let's say Alamofire
for some of it's functionalities.我目前正在开发一个 iOS 框架(比如
MyFramework
),它在内部使用 3rd 方框架,比如Alamofire
的一些功能。 How can I install this dependency using cocoapods and use it during the development of the framework.如何使用 cocoapods 安装此依赖项并在框架开发期间使用它。 Any pointers would be appreciated.
任何指针将不胜感激。 Thanks in advance!!
提前致谢!!
Assuming that MyFramework
is also going to be distributed via Cocoapods: create a hosting app for your framework, and include it as a so-called development pod:假设
MyFramework
也将通过 Cocoapods 分发:为您的框架创建一个托管应用程序,并将其包含为所谓的开发 pod:
pod 'MyFramework', :path => '.../path/to/MyFramework'
In MyFramework.podspec
, mention Alamofire as a dependency:在
MyFramework.podspec
,提及 Alamofire 作为依赖项:
s.dependency 'Alamofire'
Run pod install
.运行
pod install
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.