1.处理ios插件问题

2.改为多参数
This commit is contained in:
976623696@qq.com 2020-10-20 16:55:29 +08:00
parent aa84aa2e42
commit 9c8933241e
3 changed files with 5 additions and 8 deletions

View File

@ -4,7 +4,7 @@
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 --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">
<name>cordova-plugin-xunfeiListenSpeaking</name>
<preference name="APP_KEY" />
<preference name="CHANNEL" default="developer-default" />
<preference name="IOS_APP_KEY" />
<preference name="CHANNEL" default="developer-default" />
<engines>
<engine name="cordova" version=">=3.0" />
</engines>
@ -107,7 +108,7 @@
<framework src="Contacts.framework" />
<framework src="src/ios/iflyMSC.framework" custom="true" />
<config-file target="*IFlySpeechConfig.plist" parent="AppKey">
<string>$APP_KEY</string>
<string>$IOS_APP_KEY</string>
</config-file>
</platform>
</plugin>

View File

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