在Phonegap插件中捕获NSNotification

时间:2012-11-20 06:08:45

标签: javascript xcode cordova ios6 phonegap-plugins

我正在创建一个phonegap插件。现在在我的.m文件中我正在听NSNotification,如果触发它将转到指定的函数或方法。我的问题是,如果我的.m类中的某个事件被触发,我的javascript方是否有办法收听?任何想法?

1 个答案:

答案 0 :(得分:0)

在.m文件中尝试此目标c代码:

[super writeJavascript:@"console.log('!!!!! logging stuff !!!!!');"];