在不使用cocoapods的情况下将框架添加到现有项目中 [英] Add a framework to an existing project without using cocoapods

查看:227
本文介绍了在不使用cocoapods的情况下将框架添加到现有项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有项目,我想从

I've got an existing project where i want to add the framework called CoreActionSheetPicker from

https://github.com/skywinder/ActionSheetPicker-3.0

问题是我似乎无法将框架添加到我的项目中?当我将框架拉到我现有的项目时,没有添加下面的文件,当我尝试导入它时说它不存在

The problem is i cant seem to add the framework to my project? when i pull the framework over to my existing project none of the files below is added and when i try to import it says it does not exist

import CoreActionSheetPicker

我想在没有cocoaPods的情况下这样做。这样做的步骤是什么?我正在使用swift。我是否首先需要创建一个WorkSpace?

I want to do this without cocoaPods. What is the steps in order to do such? i'm using swift. Do i first need to create a WorkSpace?

推荐答案

我刚刚克隆它,看来项目文件无效。您可以通过尝试打开它来看到这一点。您应该在GitHub上向所有者提出问题,这就是您应该如何询问有关项目的问题。然后,您将直接从创建者或至少知道该项目的其他人那里获得反馈。

I've just cloned it, and it appears the project file is invalid. You can see this by trying to open it. You should raise the issue with the owner on GitHub, which is how you're supposed to ask questions about projects there. Then you will get feedback directly from the creator or at least someone else who knows about that project.

至于添加项目,


  1. 下载源

  2. 将.xcodeproj拖到Xcode中的项目中

  3. 在Build Phases / link binary with libraries中添加框架

  4. 添加它作为构建阶段/目标依赖项。

  1. Download the source
  2. Drag the .xcodeproj into your project within Xcode
  3. Add the framework in Build Phases / link binary with libraries
  4. Add it as a Build Phase / target dependency.

请注意,目前,您应该始终使用swift项目构建第三部分库,而不仅仅包括二进制文件。请参阅此处有关框架的二进制兼容性:

Note that at the moment, you should always builds 3rd part libraries with your swift project, and not just include the binary. See here about binary compatibility of frameworks:

https://developer.apple.com/swift/blog/?id=2

这篇关于在不使用cocoapods的情况下将框架添加到现有项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆