【问题标题】:SpeechKit Pod for Swift results in undeclared type errorsSpeechKit Pod for Swift 导致未声明的类型错误
【发布时间】:2016-03-05 17:29:46
【问题描述】:

我已经使用这个CocoaPodhttps://cocoapods.org/pods/SpeechKit 实现了 Nuance SpeechKit,并在此处实现了来自accepted S.O. answer 的指令:https://stackoverflow.com/questions/30327372/implementing-nuance-speech-recognition-on-swift-cannot-listen-to-onresult-oner

这样做后,我收到“使用未声明的类型 'SKRecognizerDelegate'”错误:

支持文件:

UIViewController 中的错误:

【问题讨论】:

    标签: ios swift compiler-errors cocoapods speechkit


    【解决方案1】:

    我看到的唯一区别是桥文件中的这些 #ifndef / #define 行,

    #ifndef Vanilla_Bridge_h
    #define Vanilla_Bridge_h
    #import <SpeechKit/SpeechKit.h>
    

    无论如何我认为这是一个桥接文件错误,请尝试将其删除并使用本指南重新添加:http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/ 祝你好运!

    【讨论】:

    • 我在我的文件或您列出的网站 (learnswiftonline.com/wp-content/uploads/2015/01/…) 的文件中没有看到“Vanilla_Bridge_h”行。你是说我需要添加它们吗?
    • 在我的例子中,Vanilla 是项目名称。当桥文件自动生成时,这些行就在那里,所以我想它们是必需的。 @肖恩
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-28
    • 2018-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多