在iOS中的项目中添加第三方框架

编程入门 行业动态 更新时间:2024-10-05 23:25:56
本文介绍了在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中的项目中添加第三方框架

本文发布于:2023-11-26 09:38:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633592.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:第三方   框架   项目   iOS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!