Add third Party Frameworks in a project in iOS

主宰稳场 提交于 2019-12-10 12:35:17

问题


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.

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

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

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?


回答1:


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’.

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

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

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

#import <NinevehGL/NinevehGL.h>

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

@interface ViewController : UIViewController <NGLViewDelegate>;

Answer Referenced from icodeblog



来源:https://stackoverflow.com/questions/19721668/add-third-party-frameworks-in-a-project-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!