在iOS中的项目中添加第三方框架 [英] Add third Party Frameworks in a project in iOS

查看:87
本文介绍了在iOS中的项目中添加第三方框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在iPad应用程序中使用 NinevehGL框架.我已将框架添加到我的Xcode项目中.但是,当我运行我的应用程序时,它会成功执行.

I am trying to use the NinevehGL framework in my iPad app. I've added the framework to my Xcode project. However, when I run my app,it executes successfully.

注意:安装完NinevehGl.pkg之后,NinevehGl框架将显示在项目模板本身中.

Note: After i installed the NinevehGl.pkg, The NinevehGl framework is shows in the project Template itself.

选择此模板意味着自动在Link Binary with Libraries中创建一些框架.

Am selecting this template means automatically it creates some frameworks in Link Binary with Libraries.

但是我的问题是:在其他Mac中运行相同的Xcode项目时,它崩溃了.由于未安装其他Mac,因此未安装此软件包.因此,我想在项目本身中添加此框架.如何添加呢?

But my issue is: While am running the same Xcode project in other mac, it crash. Because other mac's am not installed this package. So i want to add this framework in the project itself. How to add this?

推荐答案

首先,我们需要添加一些框架.

To begin with there are a few frameworks we will need to add.

首先在项目导航器窗格中选择项目主文件,以执行此操作.

Do this by first selecting your projects main file in the project navigator pane.

确保已选择项目目标,然后在构建阶段下单击"将二进制文件与库链接".

Make sure your projects target is selected, and under Build Phases click ‘Link Binaries with Libraries’.

使用此显示底部的 + 并添加 QuartsCore OpenGLES 框架.

Use the + at the bottom of this display and add the QuartsCore and OpenGLES frameworks.

下一步,使用"添加其他"按钮,导航到您下载的 NinevehGL文件夹,然后导入 NinevehGL.framework .

Next, using the ‘Add Other’ button, navigate to your downloaded NinevehGL folder and import the NinevehGL.framework.

现在进入代码…….将NinevehGL导入头文件(.h),

Now onto the code…….import NinevehGL into your header (.h) file,

#import <NinevehGL/NinevehGL.h>

将委托添加到您的@interface中,如果缺少它,则您的drawview方法将永远不会被调用.

add the delegate to your @interface, if this is missing your drawview method will never get called.

@interface ViewController : UIViewController <NGLViewDelegate>;

icodeblog

这篇关于在iOS中的项目中添加第三方框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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