diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c2b4410..6c20874 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -503,6 +503,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.kouyuxingqiu.wowenglish; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -687,6 +688,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.kouyuxingqiu.wowenglish; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -715,6 +717,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.kouyuxingqiu.wowenglish; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/ios/Runner/XSMessageMehtodChannel.swift b/ios/Runner/XSMessageMehtodChannel.swift index 1d73df6..3485b59 100644 --- a/ios/Runner/XSMessageMehtodChannel.swift +++ b/ios/Runner/XSMessageMehtodChannel.swift @@ -82,7 +82,7 @@ class XSMessageMehtodChannel: NSObject,SSOralEvaluatingManagerDelegate { */ func oralEvaluatingDidStart() { print("评测开始") -// messageChannel!.invokeMethod("voiceStart", arguments: nil) + messageChannel!.invokeMethod("voiceStart", arguments: nil) } /** @@ -90,14 +90,14 @@ class XSMessageMehtodChannel: NSObject,SSOralEvaluatingManagerDelegate { */ func oralEvaluatingDidStop() { print("评测结束") -// messageChannel!.invokeMethod("voiceEnd",arguments: nil) + messageChannel!.invokeMethod("voiceEnd",arguments: nil) } /** 评测完成后的结果 */ func oralEvaluatingDidEnd(withResult result: [AnyHashable : Any]?, requestId request_id: String?) { - var resultDict:Dictionary = result as! Dictionary + let resultDict:Dictionary = result as! Dictionary resultData! = resultDict; self.evaluateResult() } @@ -106,7 +106,11 @@ class XSMessageMehtodChannel: NSObject,SSOralEvaluatingManagerDelegate { 评测失败回调 */ func oralEvaluatingDidEndError(_ error: Error?, requestId request_id: String?) { - messageChannel!.invokeMethod("voiceFail", arguments: error?.localizedDescription) + let nsError = error as? NSError + var map = Dictionary() + map["code"] = nsError?.code + map["message"] = error?.localizedDescription + messageChannel!.invokeMethod("voiceFail", arguments:map) } /**