【发布时间】:2019-03-05 08:55:46
【问题描述】:
我已经设置了一个自定义意图,除了没有调用处理程序之外,它似乎一切正常。 Siri 的响应好像一切都成功了,但我在控制台输出中看不到任何内容,也没有触发我的断点...这是处理程序...
@implementation IntentHandler
- (id)handlerForIntent:(INIntent *)intent
{
// This is the default implementation. If you want different objects to handle different intents,
// you can override this and return the handler you want for that particular intent.
NSLog(@"In handlerForIntent.");
if ([intent isKindOfClass:[TriggerSceneIntent class]])
{
return [SceneIntentsHandler sharedInstance];
}
return self;
}
@end
我在 if 语句和两个 return 语句都有断点。他们都没有被击中。我也从未在 xCode 的控制台日志中看到“In handlerForIntent”。
我猜这是我错过的相当简单的事情,但我没有看到它。欢迎任何建议?
【问题讨论】:
-
有人解决了吗?
-
@birdcage 仍然是个问题。似乎项目或意图文件可能会失控。我正在做的另一个项目运行良好。