From 9c8933241e7eb17821adc7d025ae51147d818b87 Mon Sep 17 00:00:00 2001 From: "976623696@qq.com" Date: Tue, 20 Oct 2020 16:55:29 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A4=84=E7=90=86ios=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98=202.=E6=94=B9=E4=B8=BA=E5=A4=9A=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- plugin.xml | 5 +++-- src/ios/CDVSpeech.m | 6 +----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8722782..5740627 100644 --- a/README.md +++ b/README.md @@ -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} ## 调用方法 diff --git a/plugin.xml b/plugin.xml index c391b96..8312df4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -4,7 +4,8 @@ xmlns:android="http://schemas.android.com/apk/res/android"> cordova-plugin-xunfeiListenSpeaking - + + @@ -107,7 +108,7 @@ - $APP_KEY + $IOS_APP_KEY diff --git a/src/ios/CDVSpeech.m b/src/ios/CDVSpeech.m index 46045cb..af9c5dc 100644 --- a/src/ios/CDVSpeech.m +++ b/src/ios/CDVSpeech.m @@ -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 {