简体   繁体   English

使用Swift将GitHub框架添加到XCode项目

[英]Adding a GitHub framework to an XCode Project using Swift

Sorry if this is too basic, I'm a kind of a rookie on app development. 抱歉,如果这太基础了,我是应用程序开发的新手。

I've been trying to add this GitHub framework for SpriteKit easing to my XCode project. 我一直在尝试将用于SpriteKit缓和的GitHub框架添加到我的XCode项目中。 The only steps for installation (that doesn't require CocoaPods) the framework provides are: 1: Drag the Pod/Classes folder into your project. 框架提供的唯一安装步骤(不需要CocoaPods)是: 1:将Pod / Classes文件夹拖到项目中。 2: Import the frameworks in the _Archive folder. 2:将框架导入_Archive文件夹中。

在此处输入图片说明 However, it doesn't seem to work after doing this. 但是,这样做后似乎不起作用。 I can't import the framework into my swift files, and I can't use the actions. 我无法将框架导入到我的swift文件中,也无法使用操作。 I may've done the 2nd step wrong, I may not have done it as it's supposed. 我可能第二步做错了,我可能没有按预期做。 I've searched all over the internet for ways to import a GitHub framework into XCode, but every answer seems to be different and specific for each case. 我已经在互联网上搜索了将GitHub框架导入XCode的方法,但是每种情况下每个答案似乎都不尽相同。

I think you may have missed the second step (you say there is 'only step'). 我认为您可能已经错过了第二步(您说只有“一步”)。 The second step is to drag the framework from the _Archive folder. 第二步是从_Archive文件夹中拖动框架。 You can find it in the clone of the project folder. 您可以在项目文件夹的克隆中找到它。 Also, try the sample project and see how it's organized. 另外,请尝试示例项目并查看其组织方式。 Make sure that you add the framework to the Link Binaries... section in the project Build Phases. 确保将框架添加到项目“构建阶段”中的“链接二进制文件...”部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM