Skip to content

Instantly share code, notes, and snippets.

@guange2015
Last active December 18, 2015 00:28
Show Gist options
  • Select an option

  • Save guange2015/5696393 to your computer and use it in GitHub Desktop.

Select an option

Save guange2015/5696393 to your computer and use it in GitHub Desktop.

SDK使用说明

环境需求

Xcode 4.6 或以上

安装

新建一个osx cocoa application工程

添加静态库和头文件到你的工程

确认有以下两个文件:

  • libSunARSSDK.a
  • SunVoteBase.h

将其拖动到你的工程目录下,确保钩选项

代码使用

  1. 引入头文件
#import "SunVoteBase.h"
  1. 实现delegate

Appdelegate.h

@interface AppDelegate : NSObject <NSApplicationDelegate,BaseEventDelegate>

Appdelegate.m

-(void)KeyEvent:(NSString *)KeyID iMode:(int)iMode Time:(float)Time sInfo:(NSString* )sInfo {
    //TODO you code here.
}


-(void)BaseEvent:(int)iBaseID iMode:(int)iMode sInfo:(NSString *)sInfo  {
    //TODO you code here.
}

编译工程

直接编译既可成功,如遇到错误,请检查静态库和头文件是否成功添加

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment