Make an existing project a framework iOS(使现有项目成为 iOS 框架)
问题描述
我有一个现有的项目.我只想问是否可以将其转换为框架?我已经尝试过搜索,但我找不到任何关于如何做到这一点的教程.
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 框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使现有项目成为 iOS 框架
基础教程推荐
- 为什么姜饼模拟器方向卡在应用程序中? 2022-01-01
- Android Volley - 如何动画图像加载? 2022-01-01
- iOS - UINavigationController 添加多个正确的项目? 2022-01-01
- Play 商店的设备兼容性问题 2022-01-01
- Xcode UIView.init(frame:) 只能在主线程中使用 2022-01-01
- navigationItem.backBarButtonItem 不工作?为什么上一个菜单仍然显示为按钮? 2022-01-01
- 如何比较两个 NSDate:哪个是最近的? 2022-01-01
- SwiftUI-ScrollViewReader的ScrollTo不滚动 2022-01-01
- UIImage 在开始时不适合 UIScrollView 2022-01-01
- 如何将图像从一项活动发送到另一项活动? 2022-01-01
