Compare commits

...

3 Commits
tftm ... wd

Author SHA1 Message Date
976623696@qq.com
4c738021d0 调整readme 2020-10-20 16:59:46 +08:00
976623696@qq.com
9c8933241e 1.处理ios插件问题
2.改为多参数
2020-10-20 16:55:29 +08:00
shuto-fandd
aa84aa2e42
Merge pull request #6 from shuto-cn/master
添加appkey配置功能
2020-10-19 18:26:29 +08:00
3 changed files with 5 additions and 8 deletions

View File

@ -4,7 +4,7 @@
APP_KEY参数值为您在科大讯飞申请的appid APP_KEY参数值为您在科大讯飞申请的appid
运行cordova plugin add https://gitee.com/shuto/cordova-plugin-IFlyspeech-master.git --variable APP_KEY=${APP_KEY} 运行cordova plugin add https://gitee.com/shuto/cordova-plugin-IFlyspeech-master.git#wd --variable APP_KEY=${APP_KEY} --variable IOS_APP_KEY=${APP_KEY}
## 调用方法 ## 调用方法

View File

@ -4,7 +4,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-xunfeiListenSpeaking</name> <name>cordova-plugin-xunfeiListenSpeaking</name>
<preference name="APP_KEY" /> <preference name="APP_KEY" />
<preference name="CHANNEL" default="developer-default" /> <preference name="IOS_APP_KEY" />
<preference name="CHANNEL" default="developer-default" />
<engines> <engines>
<engine name="cordova" version=">=3.0" /> <engine name="cordova" version=">=3.0" />
</engines> </engines>
@ -107,7 +108,7 @@
<framework src="Contacts.framework" /> <framework src="Contacts.framework" />
<framework src="src/ios/iflyMSC.framework" custom="true" /> <framework src="src/ios/iflyMSC.framework" custom="true" />
<config-file target="*IFlySpeechConfig.plist" parent="AppKey"> <config-file target="*IFlySpeechConfig.plist" parent="AppKey">
<string>$APP_KEY</string> <string>$IOS_APP_KEY</string>
</config-file> </config-file>
</platform> </platform>
</plugin> </plugin>

View File

@ -34,6 +34,7 @@
NSLog(@"error: IFlySpeechConfig.plist not found"); NSLog(@"error: IFlySpeechConfig.plist not found");
assert(0); assert(0);
} }
NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
self.appId = [plistData valueForKey:@"AppKey"]; self.appId = [plistData valueForKey:@"AppKey"];
} }
@ -42,11 +43,6 @@
} }
- (void) loadAppID{
NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
}
#pragma mark - #pragma mark -
- (void)startListening:(CDVInvokedUrlCommand*)command - (void)startListening:(CDVInvokedUrlCommand*)command
{ {