我是第一次使用 wit.ai iOS SDK,我一步一步按照官网https://wit.ai/docs/ios/3.1.1/quickstart的入门页面中的内容进行操作。我收到了这个错误:
协议“WitDelegate”中的方法“witDidGraspIntent:entities:body:error:”未实现。
我仍然可以运行该应用程序,并且该消息显示在我的收件箱中(在控制台中),但没有发回响应并且应用程序崩溃。我收到了这个错误:
从回调中排队缓冲区时出错
这是我的代码
视图控制器.m
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController {
UILabel *labelView;
}
- (void)witDidGraspIntent:(NSArray *)outcomes
messageId:(NSString *)messageId
customData:(id)customData
error:(NSError*)e {
//Implementation here...
labelView.text = @"Hey what's up";
[self.view addSubview:labelView];
}
视图控制器.h
#import <UIKit/UIKit.h>
#import <Wit/Wit.h>
@interface ViewController : UIViewController <WitDelegate>
@end
谢谢。