我有一个现有的项目.我只想问是否可以将其转换为框架?我已经尝试过搜索,但我找不到任何关于如何做到这一点的教程.
I have an existing project. I just like to ask if it is possible to convert it to a framework? I have tried searching but I cannot find any tutorial on how to do it.
iOS7 或更早版本的解决方案
如果你想在 iOS7 中创建一个框架,你可以点击这个链接.它解释了如何从静态库开始创建框架.
If you want to create a framework in iOS7 you can follow this link. It explain how to create a framework starting from a static library.
http://www.raywenderlich.com/65964/create-a-framework-for-ios
iOS8 解决方案
使用 iOS8 可以原生创建框架.您可以在名为 Building Modern Frameworks 的 WWDC14 网站上找到一个不错的视频(您将找到视频和pdf).
With iOS8 is possible to create framework natively. You can find a good video in the WWDC14 website called Building Modern Frameworks (you'll find both videos and pdf).
Cocoapods
您的问题不清楚您需要对框架做什么.如果您需要共享一个库,您可以查看 cocoapods 项目.您可以将它用于 public 库或 私人.我在这两种情况下都使用它
From your question is not clear what you need to do with the framework. If you need to share a lib you can give a look to the cocoapods project. You can use it for both public libraries or privates. I'm using it at work for both the scenarios
这篇关于使现有项目成为 iOS 框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!