├── example ├── .watchmanconfig ├── .babelrc ├── demo.png ├── android │ ├── app │ │ ├── src │ │ │ └── main │ │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ └── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── app2 │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── AndroidManifest.xml │ │ ├── BUCK │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── keystores │ │ ├── debug.keystore.properties │ │ └── BUCK │ ├── settings.gradle │ ├── build.gradle │ ├── gradle.properties │ ├── gradlew.bat │ └── gradlew ├── .buckconfig ├── __tests__ │ ├── index.ios.js │ └── index.android.js ├── ios │ ├── app2 │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── AppDelegate.m │ │ ├── Info.plist │ │ └── Base.lproj │ │ │ └── LaunchScreen.xib │ ├── app2Tests │ │ ├── Info.plist │ │ └── app2Tests.m │ └── app2.xcodeproj │ │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── app2.xcscheme │ │ └── project.pbxproj ├── .gitignore ├── package.json ├── test.js ├── demo.js ├── index.ios.js ├── index.android.js └── .flowconfig ├── android ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── react │ │ │ └── arron │ │ │ └── speech │ │ │ ├── speechModulePackage.java │ │ │ └── speechModule.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── react │ │ │ └── arron │ │ │ └── speech │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── react │ │ └── arron │ │ └── speech │ │ └── ExampleInstrumentedTest.java ├── .idea │ ├── copyright │ │ └── profiles_settings.xml │ ├── modules.xml │ ├── android.iml │ ├── misc.xml │ ├── compiler.xml │ └── workspace.xml └── build.gradle ├── ios └── speech │ ├── speech.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── Arron.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcuserdata │ │ └── Arron.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── speech.xcscheme │ └── project.pbxproj │ └── speech │ ├── speechModule.h │ └── speechModule.m ├── src └── index.js ├── package.json ├── .gitignore ├── README.md └── LICENSE /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } -------------------------------------------------------------------------------- /example/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somonus/react-native-speech/HEAD/example/demo.png -------------------------------------------------------------------------------- /android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | speech 3 | 4 | -------------------------------------------------------------------------------- /android/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | app2 3 | 4 | -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somonus/react-native-speech/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somonus/react-native-speech/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somonus/react-native-speech/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somonus/react-native-speech/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somonus/react-native-speech/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'app2' 2 | 3 | include ':app' 4 | include ':react-native-speech' 5 | project(':react-native-speech').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-speech/android') 6 | -------------------------------------------------------------------------------- /ios/speech/speech.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /ios/speech/speech.xcodeproj/project.xcworkspace/xcuserdata/Arron.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somonus/react-native-speech/HEAD/ios/speech/speech.xcodeproj/project.xcworkspace/xcuserdata/Arron.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /android/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/__tests__/index.ios.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.ios.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /example/__tests__/index.android.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.android.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /android/.idea/android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/app2/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.app2; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "app2"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/src/test/java/com/react/arron/speech/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.react.arron.speech; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /example/ios/app2/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/speech/speech/speechModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // speechModule.h 3 | // speech 4 | // 5 | // Created by Arron on 16/11/2. 6 | // Copyright © 2016年 somonus. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RCTBridgeModule.h" 11 | #import 12 | 13 | @interface speechModule : NSObject 14 | 15 | @property (nonatomic, strong) RCTResponseSenderBlock callback; 16 | 17 | @property (nonatomic, strong) AVSpeechSynthesizer *synthesizer; 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | const { SpeechModule } = NativeModules; 3 | 4 | const Speech = { 5 | speak(context, callback) { 6 | let options = {}; 7 | if(context.constructor === String) { 8 | options.text = context; 9 | options.language = 'zh-CH'; 10 | } else { 11 | options = context; 12 | } 13 | if (!callback) { 14 | callback = function callback(argument) {} 15 | } 16 | SpeechModule.speak(options, callback); 17 | }, 18 | stop() { 19 | SpeechModule.stop(); 20 | } 21 | } 22 | 23 | export default Speech; 24 | -------------------------------------------------------------------------------- /example/ios/app2/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | *.iml 28 | .idea 29 | .gradle 30 | local.properties 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | 37 | # BUCK 38 | buck-out/ 39 | \.buckd/ 40 | android/app/libs 41 | android/keystores/debug.keystore 42 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app2", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "test": "jest" 8 | }, 9 | "dependencies": { 10 | "react": "15.3.2", 11 | "react-native": "0.35.0", 12 | "native-speech": "file:../" 13 | }, 14 | "jest": { 15 | "preset": "jest-react-native" 16 | }, 17 | "devDependencies": { 18 | "babel-jest": "16.0.0", 19 | "babel-preset-react-native": "1.9.0", 20 | "jest": "16.0.2", 21 | "jest-react-native": "16.0.0", 22 | "react-test-renderer": "15.3.2" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ios/speech/speech.xcodeproj/xcuserdata/Arron.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | speech.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | B1C5AE201DC9C8F000CF1D49 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "native-speech", 3 | "version": "0.1.0", 4 | "description": "Text to speech for react-native", 5 | "main": "src/index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/somonus/react-native-speech.git" 12 | }, 13 | "keywords": [ 14 | "tts", 15 | "text", 16 | "to", 17 | "speech", 18 | "react-native" 19 | ], 20 | "author": "somonus", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/somonus/react-native-speech/issues" 24 | }, 25 | "homepage": "https://github.com/somonus/react-native-speech#readme" 26 | } 27 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /example/ios/app2/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View 13 | } from 'react-native'; 14 | 15 | export default class app2 extends Component { 16 | render() { 17 | return ( 18 | 19 | 20 | Welcome to root! 21 | 22 | 23 | ); 24 | } 25 | } 26 | 27 | const styles = StyleSheet.create({ 28 | container: { 29 | flex: 1, 30 | justifyContent: 'center', 31 | alignItems: 'center', 32 | backgroundColor: '#F5FCFF', 33 | }, 34 | welcome: { 35 | fontSize: 20, 36 | textAlign: 'center', 37 | margin: 30, 38 | }, 39 | }); 40 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 16 9 | targetSdkVersion 22 10 | versionCode 1 11 | versionName "0.2.0" 12 | } 13 | 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | 21 | // needed for https://github.com/square/okio/issues/58 22 | lintOptions { 23 | warning 'InvalidPackage' 24 | } 25 | } 26 | 27 | dependencies { 28 | compile fileTree(dir: 'libs', include: ['*.jar']) 29 | compile 'com.android.support:appcompat-v7:23.0.1' 30 | compile 'com.facebook.react:react-native:0.11.+' 31 | } -------------------------------------------------------------------------------- /example/demo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View 13 | } from 'react-native'; 14 | 15 | 16 | export default class app2 extends Component { 17 | render() { 18 | return ( 19 | 20 | 21 | Welcome to test! 22 | 23 | 24 | ); 25 | } 26 | } 27 | 28 | const styles = StyleSheet.create({ 29 | container: { 30 | flex: 1, 31 | justifyContent: 'center', 32 | alignItems: 'center', 33 | backgroundColor: '#F5FCFF', 34 | }, 35 | welcome: { 36 | fontSize: 20, 37 | textAlign: 'center', 38 | margin: 30, 39 | }, 40 | }); 41 | -------------------------------------------------------------------------------- /example/ios/app2Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /android/src/androidTest/java/com/react/arron/speech/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.react.arron.speech; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.react.arron.speech.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /example/index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View 13 | } from 'react-native'; 14 | import Speech from 'native-speech'; 15 | 16 | export default class app2 extends Component { 17 | render() { 18 | Speech.speak('欢迎欢迎'); 19 | return ( 20 | 21 | 22 | Welcome to React Native! 23 | 24 | 25 | ); 26 | } 27 | } 28 | 29 | const styles = StyleSheet.create({ 30 | container: { 31 | flex: 1, 32 | justifyContent: 'center', 33 | alignItems: 'center', 34 | backgroundColor: '#F5FCFF', 35 | }, 36 | welcome: { 37 | fontSize: 20, 38 | textAlign: 'center', 39 | margin: 30, 40 | }, 41 | }); 42 | 43 | AppRegistry.registerComponent('app2', () => app2); 44 | -------------------------------------------------------------------------------- /example/index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View 13 | } from 'react-native'; 14 | import Speech from 'native-speech'; 15 | 16 | export default class app2 extends Component { 17 | render() { 18 | Speech.speak('欢迎欢迎'); 19 | return ( 20 | 21 | 22 | Welcome to React Native! 23 | 24 | 25 | ); 26 | } 27 | } 28 | 29 | const styles = StyleSheet.create({ 30 | container: { 31 | flex: 1, 32 | justifyContent: 'center', 33 | alignItems: 'center', 34 | backgroundColor: '#F5FCFF', 35 | }, 36 | welcome: { 37 | fontSize: 20, 38 | textAlign: 'center', 39 | margin: 30, 40 | }, 41 | }); 42 | 43 | AppRegistry.registerComponent('app2', () => app2); 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # native-speech 2 | 3 | native-speech是使用手机系统自带的tts功能合成语音的组件,可将输入的文本转为语音播放。 4 | 5 | ## Install 6 | 7 | 通过npm安装,并通过react-native-cli将原生组件链接至你的工程。 8 | 9 | ``` 10 | npm install native-speech --save 11 | react-native link 12 | ``` 13 | 14 | ## Usage 15 | 16 | ### 可用方法 17 | 18 | * `speak(context, callback)`: 播放语音方法。 19 | - `context`(String or Object): context为要播放的内容,可以是一个字符串或者一个对象,当是一个字符串时,则默认以中文播放当前字符串。如果是一个对象,则根据对象的key进行播放。对象包含的key有: 20 | - `text`: 需要播放的文本内容 21 | - `language`: 需要以哪种语言播放 22 | - `callback`(function): 语言播放完成的回调函数 23 | 24 | * `stop()`: 停止播放。 25 | 26 | ```js 27 | import Speech from 'native-speech'; 28 | 29 | Speech.speak('测试语音', () => alert('callback')); 30 | 31 | ``` 32 | 33 | ##Example 34 | 35 | *run demo* 36 | 37 | ``` 38 | cd example 39 | npm install 40 | react-native link 41 | npm start 42 | ``` 43 | 44 | ### IOS 45 | 46 | 打开ios目录下的xcode工程,点击run 47 | 48 | ### Android 49 | 50 | 使用Android studio打开Android目录,点击run 51 | 52 | ## License 53 | 54 | native-speech is released under the MIT license. 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Arron Zhu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/app2/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.app2; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.react.arron.speech.speechModulePackage; 8 | import com.facebook.react.ReactInstanceManager; 9 | import com.facebook.react.ReactNativeHost; 10 | import com.facebook.react.ReactPackage; 11 | import com.facebook.react.shell.MainReactPackage; 12 | 13 | import java.util.Arrays; 14 | import java.util.List; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 19 | @Override 20 | protected boolean getUseDeveloperSupport() { 21 | return BuildConfig.DEBUG; 22 | } 23 | 24 | @Override 25 | protected List getPackages() { 26 | return Arrays.asList( 27 | new MainReactPackage(), 28 | new speechModulePackage() 29 | ); 30 | } 31 | }; 32 | 33 | @Override 34 | public ReactNativeHost getReactNativeHost() { 35 | return mReactNativeHost; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/com/react/arron/speech/speechModulePackage.java: -------------------------------------------------------------------------------- 1 | package com.react.arron.speech; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | /** 14 | * Created by Arron on 16/11/2. 15 | */ 16 | 17 | public class speechModulePackage implements ReactPackage { 18 | @Override 19 | public List createNativeModules(ReactApplicationContext reactContext) { 20 | List modules = new ArrayList<>(); 21 | modules.add(new speechModule(reactContext)); 22 | return modules; 23 | } 24 | 25 | @Override 26 | public List> createJSModules() { 27 | return Collections.emptyList(); 28 | } 29 | 30 | @Override 31 | public List createViewManagers(ReactApplicationContext reactContext) { 32 | return Collections.emptyList(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /example/ios/app2/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTBundleURLProvider.h" 13 | #import "RCTRootView.h" 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"app2" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /example/android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.app2', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.app2', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /example/ios/app2/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSTemporaryExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /example/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*[.]android.js 5 | 6 | # Ignore templates with `@flow` in header 7 | .*/local-cli/generator.* 8 | 9 | # Ignore malformed json 10 | .*/node_modules/y18n/test/.*\.json 11 | 12 | # Ignore the website subdir 13 | /website/.* 14 | 15 | # Ignore BUCK generated dirs 16 | /\.buckd/ 17 | 18 | # Ignore unexpected extra @providesModule 19 | .*/node_modules/commoner/test/source/widget/share.js 20 | 21 | # Ignore duplicate module providers 22 | # For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root 23 | .*/Libraries/react-native/React.js 24 | .*/Libraries/react-native/ReactNative.js 25 | .*/node_modules/jest-runtime/build/__tests__/.* 26 | 27 | [include] 28 | 29 | [libs] 30 | node_modules/react-native/Libraries/react-native/react-native-interface.js 31 | node_modules/react-native/flow 32 | flow/ 33 | 34 | [options] 35 | module.system=haste 36 | 37 | esproposal.class_static_fields=enable 38 | esproposal.class_instance_fields=enable 39 | 40 | experimental.strict_type_args=true 41 | 42 | munge_underscores=true 43 | 44 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 45 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 46 | 47 | suppress_type=$FlowIssue 48 | suppress_type=$FlowFixMe 49 | suppress_type=$FixMe 50 | 51 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 52 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 53 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 54 | 55 | unsafe.enable_getters_and_setters=true 56 | 57 | [version] 58 | ^0.32.0 59 | -------------------------------------------------------------------------------- /example/ios/app2Tests/app2Tests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface app2Tests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation app2Tests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /ios/speech/speech.xcodeproj/xcuserdata/Arron.xcuserdatad/xcschemes/speech.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /ios/speech/speech/speechModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // speechModule.m 3 | // speech 4 | // 5 | // Created by Arron on 16/11/2. 6 | // Copyright © 2016年 somonus. All rights reserved. 7 | // 8 | 9 | #import "speechModule.h" 10 | #import "RCTUtils.h" 11 | #import "RCTLog.h" 12 | 13 | @implementation speechModule 14 | 15 | 16 | RCT_EXPORT_MODULE(SpeechModule) 17 | 18 | // Speak 19 | RCT_EXPORT_METHOD(speak:(NSDictionary *)args callback:(RCTResponseSenderBlock)callback) 20 | { 21 | // Error if self.synthesizer was already initialized 22 | if (self.synthesizer) { 23 | return callback(@[RCTMakeError(@"There is a speech in progress. Use the `paused` method to know if it's paused.", nil, nil)]); 24 | } 25 | 26 | // Set args to variables 27 | NSString *text = args[@"text"]; 28 | NSString *lang = args[@"language"] ? args[@"language"] : @"zh-CH"; 29 | NSNumber *rate = args[@"rate"]; 30 | 31 | // Error if no text is passed 32 | if (!text) { 33 | RCTLogError(@"[Speech] You must specify a text to speak."); 34 | return; 35 | } 36 | 37 | // Setup utterance and voice 38 | AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:text]; 39 | 40 | utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:lang]; 41 | 42 | if (rate) { 43 | utterance.rate = [rate doubleValue]; 44 | } 45 | 46 | self.synthesizer = [[AVSpeechSynthesizer alloc] init]; 47 | self.synthesizer.delegate = self; 48 | 49 | // Speak 50 | [self.synthesizer speakUtterance:utterance]; 51 | 52 | _callback = callback; 53 | } 54 | 55 | // Stops synthesizer 56 | RCT_EXPORT_METHOD(stop) 57 | { 58 | if (self.synthesizer) { 59 | [self.synthesizer stopSpeakingAtBoundary:AVSpeechBoundaryImmediate]; 60 | } 61 | } 62 | 63 | // Pauses synthesizer 64 | RCT_EXPORT_METHOD(pauseSpeaking) 65 | { 66 | if (self.synthesizer) { 67 | [self.synthesizer pauseSpeakingAtBoundary:AVSpeechBoundaryImmediate]; 68 | } 69 | } 70 | 71 | // Resumes synthesizer 72 | RCT_EXPORT_METHOD(continueSpeaking) 73 | { 74 | if (self.synthesizer) { 75 | [self.synthesizer continueSpeaking]; 76 | } 77 | } 78 | 79 | // Returns false if synthesizer is paued 80 | RCT_EXPORT_METHOD(isPaused:(RCTResponseSenderBlock)callback) 81 | { 82 | if (self.synthesizer.paused) { 83 | callback(@[@true]); 84 | } else { 85 | callback(@[@false]); 86 | } 87 | } 88 | 89 | // Returns true if synthesizer is speaking 90 | RCT_EXPORT_METHOD(isSpeaking:(RCTResponseSenderBlock)callback) 91 | { 92 | if (self.synthesizer.speaking) { 93 | callback(@[@true]); 94 | } else { 95 | callback(@[@false]); 96 | } 97 | } 98 | 99 | // Returns available voices 100 | RCT_EXPORT_METHOD(speechVoices:(RCTResponseSenderBlock)callback) 101 | { 102 | NSArray *speechVoices = [AVSpeechSynthesisVoice speechVoices]; 103 | NSArray *locales = [speechVoices valueForKey:@"language"]; 104 | 105 | callback(@[[NSNull null], locales]); 106 | } 107 | 108 | // Delegate 109 | 110 | // Finished Handler 111 | -(void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didFinishSpeechUtterance:(AVSpeechUtterance *)utterance 112 | { 113 | self.synthesizer = nil; 114 | _callback(@[@true]); 115 | } 116 | 117 | @end 118 | -------------------------------------------------------------------------------- /example/ios/app2/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/ios/app2.xcodeproj/xcshareddata/xcschemes/app2.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // the root of your project, i.e. where "package.json" lives 37 | * root: "../../", 38 | * 39 | * // where to put the JS bundle asset in debug mode 40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 41 | * 42 | * // where to put the JS bundle asset in release mode 43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 44 | * 45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 46 | * // require('./image.png')), in debug mode 47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 48 | * 49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 50 | * // require('./image.png')), in release mode 51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 52 | * 53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 57 | * // for example, you might want to remove it from here. 58 | * inputExcludes: ["android/**", "ios/**"], 59 | * 60 | * // override which node gets called and with what additional arguments 61 | * nodeExecutableAndArgs: ["node"] 62 | * 63 | * // supply additional arguments to the packager 64 | * extraPackagerArgs: [] 65 | * ] 66 | */ 67 | 68 | apply from: "../../node_modules/react-native/react.gradle" 69 | 70 | /** 71 | * Set this to true to create two separate APKs instead of one: 72 | * - An APK that only works on ARM devices 73 | * - An APK that only works on x86 devices 74 | * The advantage is the size of the APK is reduced by about 4MB. 75 | * Upload all the APKs to the Play Store and people will download 76 | * the correct one based on the CPU architecture of their device. 77 | */ 78 | def enableSeparateBuildPerCPUArchitecture = false 79 | 80 | /** 81 | * Run Proguard to shrink the Java bytecode in release builds. 82 | */ 83 | def enableProguardInReleaseBuilds = false 84 | 85 | android { 86 | compileSdkVersion 23 87 | buildToolsVersion "23.0.1" 88 | 89 | defaultConfig { 90 | applicationId "com.app2" 91 | minSdkVersion 16 92 | targetSdkVersion 22 93 | versionCode 1 94 | versionName "1.0" 95 | ndk { 96 | abiFilters "armeabi-v7a", "x86" 97 | } 98 | } 99 | splits { 100 | abi { 101 | reset() 102 | enable enableSeparateBuildPerCPUArchitecture 103 | universalApk false // If true, also generate a universal APK 104 | include "armeabi-v7a", "x86" 105 | } 106 | } 107 | buildTypes { 108 | release { 109 | minifyEnabled enableProguardInReleaseBuilds 110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 111 | } 112 | } 113 | // applicationVariants are e.g. debug, release 114 | applicationVariants.all { variant -> 115 | variant.outputs.each { output -> 116 | // For each separate APK per architecture, set a unique version code as described here: 117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 118 | def versionCodes = ["armeabi-v7a":1, "x86":2] 119 | def abi = output.getFilter(OutputFile.ABI) 120 | if (abi != null) { // null for the universal-debug, universal-release variants 121 | output.versionCodeOverride = 122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 123 | } 124 | } 125 | } 126 | } 127 | 128 | dependencies { 129 | compile project(':react-native-speech') 130 | compile fileTree(dir: "libs", include: ["*.jar"]) 131 | compile "com.android.support:appcompat-v7:23.0.1" 132 | compile "com.facebook.react:react-native:+" // From node_modules 133 | } 134 | 135 | // Run this once to be able to run the application with BUCK 136 | // puts all compile dependencies into folder libs for BUCK to use 137 | task copyDownloadableDepsToLibs(type: Copy) { 138 | from configurations.compile 139 | into 'libs' 140 | } 141 | -------------------------------------------------------------------------------- /android/src/main/java/com/react/arron/speech/speechModule.java: -------------------------------------------------------------------------------- 1 | package com.react.arron.speech; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | import android.speech.tts.TextToSpeech; 6 | 7 | 8 | import com.facebook.common.logging.FLog; 9 | import com.facebook.react.bridge.Arguments; 10 | import com.facebook.react.bridge.Callback; 11 | import com.facebook.react.bridge.GuardedAsyncTask; 12 | import com.facebook.react.bridge.ReactApplicationContext; 13 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 14 | import com.facebook.react.bridge.ReactMethod; 15 | import com.facebook.react.bridge.ReadableMap; 16 | import com.facebook.react.bridge.WritableArray; 17 | import com.facebook.react.common.ReactConstants; 18 | 19 | import java.util.Locale; 20 | import java.util.Set; 21 | 22 | /** 23 | * Created by Arron on 16/11/2. 24 | */ 25 | 26 | public class speechModule extends ReactContextBaseJavaModule { 27 | 28 | private static TextToSpeech tts; 29 | 30 | public speechModule(ReactApplicationContext reactContext) { 31 | super(reactContext); 32 | init(); 33 | } 34 | 35 | /*** 36 | * This method will expose all the available languages in TTS engine 37 | * 38 | * @param callback 39 | */ 40 | @ReactMethod 41 | public void getLocale(final Callback callback) { 42 | new GuardedAsyncTask(getReactApplicationContext()) { 43 | @Override 44 | protected void doInBackgroundGuarded(Void... params) { 45 | try { 46 | if (tts == null) { 47 | init(); 48 | } 49 | Locale[] locales = Locale.getAvailableLocales(); 50 | WritableArray data = Arguments.createArray(); 51 | for (Locale locale : locales) { 52 | int res = tts.isLanguageAvailable(locale); 53 | if (res == TextToSpeech.LANG_COUNTRY_AVAILABLE) { 54 | data.pushString(locale.getLanguage()); 55 | } 56 | } 57 | callback.invoke(null, data); 58 | } catch (Exception e) { 59 | callback.invoke(e.getMessage()); 60 | } 61 | } 62 | }.execute(); 63 | } 64 | 65 | @ReactMethod 66 | public void isSpeaking(final Callback callback) { 67 | new GuardedAsyncTask(getReactApplicationContext()) { 68 | @Override 69 | protected void doInBackgroundGuarded(Void... params) { 70 | try { 71 | if (tts.isSpeaking()) { 72 | callback.invoke(null, true); 73 | } else { 74 | callback.invoke(null, false); 75 | } 76 | } catch (Exception e) { 77 | callback.invoke(e.getMessage()); 78 | } 79 | } 80 | }.execute(); 81 | } 82 | 83 | public void init() { 84 | tts = new TextToSpeech(getReactApplicationContext(), new TextToSpeech.OnInitListener() { 85 | @Override 86 | public void onInit(int status) { 87 | if (status == TextToSpeech.ERROR) { 88 | FLog.e(ReactConstants.TAG, "Not able to initialized the TTS object"); 89 | } 90 | } 91 | }); 92 | } 93 | 94 | @ReactMethod 95 | public void stop() { 96 | new GuardedAsyncTask(getReactApplicationContext()) { 97 | @Override 98 | protected void doInBackgroundGuarded(Void... params) { 99 | tts.stop(); 100 | } 101 | }.execute(); 102 | } 103 | 104 | @ReactMethod 105 | public void shutDown(final Callback callBack) { 106 | new GuardedAsyncTask(getReactApplicationContext()) { 107 | @Override 108 | protected void doInBackgroundGuarded(Void... params) { 109 | if (tts == null) { 110 | callBack.invoke(true); 111 | } 112 | try { 113 | tts.shutdown(); 114 | callBack.invoke(null, true); 115 | } catch (Exception e) { 116 | callBack.invoke(e.getMessage()); 117 | } 118 | } 119 | }.execute(); 120 | } 121 | 122 | @Override 123 | public String getName() { 124 | return "SpeechModule"; 125 | } 126 | 127 | @ReactMethod 128 | public void speak(final ReadableMap args, final Callback callback) { 129 | new GuardedAsyncTask(getReactApplicationContext()) { 130 | @Override 131 | protected void doInBackgroundGuarded(Void... params) { 132 | if (tts == null) { 133 | init(); 134 | } 135 | String text = args.hasKey("text") ? args.getString("text") : null; 136 | String language = args.hasKey("language") ? args.getString("language") : null; 137 | Boolean forceStop = args.hasKey("forceStop") ? args.getBoolean("forceStop") : null; 138 | Float pitch = args.hasKey("pitch") ? (float) args.getDouble("pitch") : null; 139 | if (tts.isSpeaking()) { 140 | //Force to stop and start new speech 141 | if (forceStop != null && forceStop) { 142 | tts.stop(); 143 | } else { 144 | callback.invoke("TTS is already speaking something , Please shutdown or stop TTS and try again"); 145 | return; 146 | } 147 | } 148 | if (args.getString("text") == null || text == "") { 149 | callback.invoke("t can not be blank"); 150 | return; 151 | } 152 | try { 153 | if (language != null && language != "") { 154 | tts.setLanguage(new Locale(language)); 155 | } else { 156 | //Setting up default language 157 | tts.setLanguage(new Locale("en")); 158 | } 159 | //Set the pitch if provided by the user 160 | if (pitch != null) { 161 | tts.setPitch(pitch); 162 | } 163 | //TODO:: Need to implement the UTTERANCE Id and give the callback 164 | int speakResult = 0; 165 | if (Build.VERSION.SDK_INT >= 21) 166 | speakResult = tts.speak(text, TextToSpeech.QUEUE_FLUSH, null, null); 167 | else 168 | speakResult = tts.speak(text, TextToSpeech.QUEUE_FLUSH, null, null); 169 | 170 | if (speakResult < 0) 171 | throw new Exception("Speak failed, make sure that TTS service is installed on you device"); 172 | 173 | callback.invoke(null, true); 174 | } catch (Exception e) { 175 | callback.invoke(e.getMessage()); 176 | } 177 | } 178 | }.execute(); 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /ios/speech/speech.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B1C5AE2F1DC9C94A00CF1D49 /* speechModule.m in Sources */ = {isa = PBXBuildFile; fileRef = B1C5AE2E1DC9C94A00CF1D49 /* speechModule.m */; }; 11 | /* End PBXBuildFile section */ 12 | 13 | /* Begin PBXCopyFilesBuildPhase section */ 14 | B1C5AE1F1DC9C8F000CF1D49 /* CopyFiles */ = { 15 | isa = PBXCopyFilesBuildPhase; 16 | buildActionMask = 2147483647; 17 | dstPath = "include/$(PRODUCT_NAME)"; 18 | dstSubfolderSpec = 16; 19 | files = ( 20 | ); 21 | runOnlyForDeploymentPostprocessing = 0; 22 | }; 23 | /* End PBXCopyFilesBuildPhase section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | B1C5AE211DC9C8F000CF1D49 /* libspeech.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libspeech.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | B1C5AE2D1DC9C94A00CF1D49 /* speechModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speechModule.h; sourceTree = ""; }; 28 | B1C5AE2E1DC9C94A00CF1D49 /* speechModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = speechModule.m; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | B1C5AE1E1DC9C8F000CF1D49 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | B1C5AE181DC9C8F000CF1D49 = { 43 | isa = PBXGroup; 44 | children = ( 45 | B1C5AE231DC9C8F000CF1D49 /* speech */, 46 | B1C5AE221DC9C8F000CF1D49 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | B1C5AE221DC9C8F000CF1D49 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | B1C5AE211DC9C8F000CF1D49 /* libspeech.a */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | B1C5AE231DC9C8F000CF1D49 /* speech */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | B1C5AE2D1DC9C94A00CF1D49 /* speechModule.h */, 62 | B1C5AE2E1DC9C94A00CF1D49 /* speechModule.m */, 63 | ); 64 | path = speech; 65 | sourceTree = ""; 66 | }; 67 | /* End PBXGroup section */ 68 | 69 | /* Begin PBXNativeTarget section */ 70 | B1C5AE201DC9C8F000CF1D49 /* speech */ = { 71 | isa = PBXNativeTarget; 72 | buildConfigurationList = B1C5AE2A1DC9C8F000CF1D49 /* Build configuration list for PBXNativeTarget "speech" */; 73 | buildPhases = ( 74 | B1C5AE1D1DC9C8F000CF1D49 /* Sources */, 75 | B1C5AE1E1DC9C8F000CF1D49 /* Frameworks */, 76 | B1C5AE1F1DC9C8F000CF1D49 /* CopyFiles */, 77 | ); 78 | buildRules = ( 79 | ); 80 | dependencies = ( 81 | ); 82 | name = speech; 83 | productName = speech; 84 | productReference = B1C5AE211DC9C8F000CF1D49 /* libspeech.a */; 85 | productType = "com.apple.product-type.library.static"; 86 | }; 87 | /* End PBXNativeTarget section */ 88 | 89 | /* Begin PBXProject section */ 90 | B1C5AE191DC9C8F000CF1D49 /* Project object */ = { 91 | isa = PBXProject; 92 | attributes = { 93 | LastUpgradeCheck = 0800; 94 | ORGANIZATIONNAME = somonus; 95 | TargetAttributes = { 96 | B1C5AE201DC9C8F000CF1D49 = { 97 | CreatedOnToolsVersion = 8.0; 98 | ProvisioningStyle = Automatic; 99 | }; 100 | }; 101 | }; 102 | buildConfigurationList = B1C5AE1C1DC9C8F000CF1D49 /* Build configuration list for PBXProject "speech" */; 103 | compatibilityVersion = "Xcode 3.2"; 104 | developmentRegion = English; 105 | hasScannedForEncodings = 0; 106 | knownRegions = ( 107 | en, 108 | ); 109 | mainGroup = B1C5AE181DC9C8F000CF1D49; 110 | productRefGroup = B1C5AE221DC9C8F000CF1D49 /* Products */; 111 | projectDirPath = ""; 112 | projectRoot = ""; 113 | targets = ( 114 | B1C5AE201DC9C8F000CF1D49 /* speech */, 115 | ); 116 | }; 117 | /* End PBXProject section */ 118 | 119 | /* Begin PBXSourcesBuildPhase section */ 120 | B1C5AE1D1DC9C8F000CF1D49 /* Sources */ = { 121 | isa = PBXSourcesBuildPhase; 122 | buildActionMask = 2147483647; 123 | files = ( 124 | B1C5AE2F1DC9C94A00CF1D49 /* speechModule.m in Sources */, 125 | ); 126 | runOnlyForDeploymentPostprocessing = 0; 127 | }; 128 | /* End PBXSourcesBuildPhase section */ 129 | 130 | /* Begin XCBuildConfiguration section */ 131 | B1C5AE281DC9C8F000CF1D49 /* Debug */ = { 132 | isa = XCBuildConfiguration; 133 | buildSettings = { 134 | ALWAYS_SEARCH_USER_PATHS = NO; 135 | CLANG_ANALYZER_NONNULL = YES; 136 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 137 | CLANG_CXX_LIBRARY = "libc++"; 138 | CLANG_ENABLE_MODULES = YES; 139 | CLANG_ENABLE_OBJC_ARC = YES; 140 | CLANG_WARN_BOOL_CONVERSION = YES; 141 | CLANG_WARN_CONSTANT_CONVERSION = YES; 142 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 143 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 144 | CLANG_WARN_EMPTY_BODY = YES; 145 | CLANG_WARN_ENUM_CONVERSION = YES; 146 | CLANG_WARN_INFINITE_RECURSION = YES; 147 | CLANG_WARN_INT_CONVERSION = YES; 148 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 149 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 150 | CLANG_WARN_UNREACHABLE_CODE = YES; 151 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 152 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 153 | COPY_PHASE_STRIP = NO; 154 | DEBUG_INFORMATION_FORMAT = dwarf; 155 | ENABLE_STRICT_OBJC_MSGSEND = YES; 156 | ENABLE_TESTABILITY = YES; 157 | GCC_C_LANGUAGE_STANDARD = gnu99; 158 | GCC_DYNAMIC_NO_PIC = NO; 159 | GCC_NO_COMMON_BLOCKS = YES; 160 | GCC_OPTIMIZATION_LEVEL = 0; 161 | GCC_PREPROCESSOR_DEFINITIONS = ( 162 | "DEBUG=1", 163 | "$(inherited)", 164 | ); 165 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 166 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 167 | GCC_WARN_UNDECLARED_SELECTOR = YES; 168 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 169 | GCC_WARN_UNUSED_FUNCTION = YES; 170 | GCC_WARN_UNUSED_VARIABLE = YES; 171 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 172 | MTL_ENABLE_DEBUG_INFO = YES; 173 | ONLY_ACTIVE_ARCH = YES; 174 | SDKROOT = iphoneos; 175 | }; 176 | name = Debug; 177 | }; 178 | B1C5AE291DC9C8F000CF1D49 /* Release */ = { 179 | isa = XCBuildConfiguration; 180 | buildSettings = { 181 | ALWAYS_SEARCH_USER_PATHS = NO; 182 | CLANG_ANALYZER_NONNULL = YES; 183 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 184 | CLANG_CXX_LIBRARY = "libc++"; 185 | CLANG_ENABLE_MODULES = YES; 186 | CLANG_ENABLE_OBJC_ARC = YES; 187 | CLANG_WARN_BOOL_CONVERSION = YES; 188 | CLANG_WARN_CONSTANT_CONVERSION = YES; 189 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 190 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 191 | CLANG_WARN_EMPTY_BODY = YES; 192 | CLANG_WARN_ENUM_CONVERSION = YES; 193 | CLANG_WARN_INFINITE_RECURSION = YES; 194 | CLANG_WARN_INT_CONVERSION = YES; 195 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 196 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 197 | CLANG_WARN_UNREACHABLE_CODE = YES; 198 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 199 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 200 | COPY_PHASE_STRIP = NO; 201 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 202 | ENABLE_NS_ASSERTIONS = NO; 203 | ENABLE_STRICT_OBJC_MSGSEND = YES; 204 | GCC_C_LANGUAGE_STANDARD = gnu99; 205 | GCC_NO_COMMON_BLOCKS = YES; 206 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 207 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 208 | GCC_WARN_UNDECLARED_SELECTOR = YES; 209 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 210 | GCC_WARN_UNUSED_FUNCTION = YES; 211 | GCC_WARN_UNUSED_VARIABLE = YES; 212 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 213 | MTL_ENABLE_DEBUG_INFO = NO; 214 | SDKROOT = iphoneos; 215 | VALIDATE_PRODUCT = YES; 216 | }; 217 | name = Release; 218 | }; 219 | B1C5AE2B1DC9C8F000CF1D49 /* Debug */ = { 220 | isa = XCBuildConfiguration; 221 | buildSettings = { 222 | HEADER_SEARCH_PATHS = ( 223 | "$(inherited)", 224 | "$(SRCROOT)/../../../../React/**", 225 | "$(SRCROOT)/../../../react-native/React/**", 226 | ); 227 | OTHER_LDFLAGS = "-ObjC"; 228 | PRODUCT_NAME = "$(TARGET_NAME)"; 229 | SKIP_INSTALL = YES; 230 | }; 231 | name = Debug; 232 | }; 233 | B1C5AE2C1DC9C8F000CF1D49 /* Release */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | HEADER_SEARCH_PATHS = ( 237 | "$(inherited)", 238 | "$(SRCROOT)/../../../../React/**", 239 | "$(SRCROOT)/../../../react-native/React/**", 240 | ); 241 | OTHER_LDFLAGS = "-ObjC"; 242 | PRODUCT_NAME = "$(TARGET_NAME)"; 243 | SKIP_INSTALL = YES; 244 | }; 245 | name = Release; 246 | }; 247 | /* End XCBuildConfiguration section */ 248 | 249 | /* Begin XCConfigurationList section */ 250 | B1C5AE1C1DC9C8F000CF1D49 /* Build configuration list for PBXProject "speech" */ = { 251 | isa = XCConfigurationList; 252 | buildConfigurations = ( 253 | B1C5AE281DC9C8F000CF1D49 /* Debug */, 254 | B1C5AE291DC9C8F000CF1D49 /* Release */, 255 | ); 256 | defaultConfigurationIsVisible = 0; 257 | defaultConfigurationName = Release; 258 | }; 259 | B1C5AE2A1DC9C8F000CF1D49 /* Build configuration list for PBXNativeTarget "speech" */ = { 260 | isa = XCConfigurationList; 261 | buildConfigurations = ( 262 | B1C5AE2B1DC9C8F000CF1D49 /* Debug */, 263 | B1C5AE2C1DC9C8F000CF1D49 /* Release */, 264 | ); 265 | defaultConfigurationIsVisible = 0; 266 | defaultConfigurationName = Release; 267 | }; 268 | /* End XCConfigurationList section */ 269 | }; 270 | rootObject = B1C5AE191DC9C8F000CF1D49 /* Project object */; 271 | } 272 | -------------------------------------------------------------------------------- /android/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 86 | 87 | 88 | 89 | 103 | 104 | 105 | 106 | 107 | 108 | 115 | 116 | 117 | 118 | 136 | 143 | 144 | 152 | 153 | 155 | 156 | 157 | 159 | 160 | 161 | 162 | 1478066715267 163 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 203 | 204 | 205 | 206 | 207 | -------------------------------------------------------------------------------- /example/ios/app2.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 00E356F31AD99517003FC87E /* app2Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* app2Tests.m */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 25 | 1877D902CA4245F4B32F65C9 /* libspeech.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3690D5E2373141CF9D68BDDB /* libspeech.a */; }; 26 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 33 | proxyType = 2; 34 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 35 | remoteInfo = RCTActionSheet; 36 | }; 37 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 40 | proxyType = 2; 41 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 42 | remoteInfo = RCTGeolocation; 43 | }; 44 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 49 | remoteInfo = RCTImage; 50 | }; 51 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 56 | remoteInfo = RCTNetwork; 57 | }; 58 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 61 | proxyType = 2; 62 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 63 | remoteInfo = RCTVibration; 64 | }; 65 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 68 | proxyType = 1; 69 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 70 | remoteInfo = app2; 71 | }; 72 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 75 | proxyType = 2; 76 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 77 | remoteInfo = RCTSettings; 78 | }; 79 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 82 | proxyType = 2; 83 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 84 | remoteInfo = RCTWebSocket; 85 | }; 86 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 87 | isa = PBXContainerItemProxy; 88 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 89 | proxyType = 2; 90 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 91 | remoteInfo = React; 92 | }; 93 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 94 | isa = PBXContainerItemProxy; 95 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 96 | proxyType = 2; 97 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 98 | remoteInfo = RCTLinking; 99 | }; 100 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 101 | isa = PBXContainerItemProxy; 102 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 103 | proxyType = 2; 104 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 105 | remoteInfo = RCTText; 106 | }; 107 | B1C5AE471DC9CA9100CF1D49 /* PBXContainerItemProxy */ = { 108 | isa = PBXContainerItemProxy; 109 | containerPortal = FA87D6E659E44B43AAD13FBD /* speech.xcodeproj */; 110 | proxyType = 2; 111 | remoteGlobalIDString = B1C5AE211DC9C8F000CF1D49; 112 | remoteInfo = speech; 113 | }; 114 | /* End PBXContainerItemProxy section */ 115 | 116 | /* Begin PBXFileReference section */ 117 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 118 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 119 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 120 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 121 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 122 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 123 | 00E356EE1AD99517003FC87E /* app2Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = app2Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 124 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 125 | 00E356F21AD99517003FC87E /* app2Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = app2Tests.m; sourceTree = ""; }; 126 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 127 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 128 | 13B07F961A680F5B00A75B9A /* app2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = app2.app; sourceTree = BUILT_PRODUCTS_DIR; }; 129 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = app2/AppDelegate.h; sourceTree = ""; }; 130 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = app2/AppDelegate.m; sourceTree = ""; }; 131 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 132 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = app2/Images.xcassets; sourceTree = ""; }; 133 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = app2/Info.plist; sourceTree = ""; }; 134 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = app2/main.m; sourceTree = ""; }; 135 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 136 | 3690D5E2373141CF9D68BDDB /* libspeech.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libspeech.a; sourceTree = ""; }; 137 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 138 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 139 | FA87D6E659E44B43AAD13FBD /* speech.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = speech.xcodeproj; path = "../node_modules/react-native-speech/ios/speech/speech.xcodeproj"; sourceTree = ""; }; 140 | /* End PBXFileReference section */ 141 | 142 | /* Begin PBXFrameworksBuildPhase section */ 143 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 144 | isa = PBXFrameworksBuildPhase; 145 | buildActionMask = 2147483647; 146 | files = ( 147 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 152 | isa = PBXFrameworksBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 156 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 157 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 158 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 159 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 160 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 161 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 162 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 163 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 164 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 165 | 1877D902CA4245F4B32F65C9 /* libspeech.a in Frameworks */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXFrameworksBuildPhase section */ 170 | 171 | /* Begin PBXGroup section */ 172 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 176 | ); 177 | name = Products; 178 | sourceTree = ""; 179 | }; 180 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 184 | ); 185 | name = Products; 186 | sourceTree = ""; 187 | }; 188 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 192 | ); 193 | name = Products; 194 | sourceTree = ""; 195 | }; 196 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 197 | isa = PBXGroup; 198 | children = ( 199 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 200 | ); 201 | name = Products; 202 | sourceTree = ""; 203 | }; 204 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 205 | isa = PBXGroup; 206 | children = ( 207 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 208 | ); 209 | name = Products; 210 | sourceTree = ""; 211 | }; 212 | 00E356EF1AD99517003FC87E /* app2Tests */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | 00E356F21AD99517003FC87E /* app2Tests.m */, 216 | 00E356F01AD99517003FC87E /* Supporting Files */, 217 | ); 218 | path = app2Tests; 219 | sourceTree = ""; 220 | }; 221 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | 00E356F11AD99517003FC87E /* Info.plist */, 225 | ); 226 | name = "Supporting Files"; 227 | sourceTree = ""; 228 | }; 229 | 139105B71AF99BAD00B5F7CC /* Products */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 233 | ); 234 | name = Products; 235 | sourceTree = ""; 236 | }; 237 | 139FDEE71B06529A00C62182 /* Products */ = { 238 | isa = PBXGroup; 239 | children = ( 240 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 241 | ); 242 | name = Products; 243 | sourceTree = ""; 244 | }; 245 | 13B07FAE1A68108700A75B9A /* app2 */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 249 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 250 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 251 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 252 | 13B07FB61A68108700A75B9A /* Info.plist */, 253 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 254 | 13B07FB71A68108700A75B9A /* main.m */, 255 | ); 256 | name = app2; 257 | sourceTree = ""; 258 | }; 259 | 146834001AC3E56700842450 /* Products */ = { 260 | isa = PBXGroup; 261 | children = ( 262 | 146834041AC3E56700842450 /* libReact.a */, 263 | ); 264 | name = Products; 265 | sourceTree = ""; 266 | }; 267 | 78C398B11ACF4ADC00677621 /* Products */ = { 268 | isa = PBXGroup; 269 | children = ( 270 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 271 | ); 272 | name = Products; 273 | sourceTree = ""; 274 | }; 275 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 276 | isa = PBXGroup; 277 | children = ( 278 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 279 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 280 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 281 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 282 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 283 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 284 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 285 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 286 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 287 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 288 | FA87D6E659E44B43AAD13FBD /* speech.xcodeproj */, 289 | ); 290 | name = Libraries; 291 | sourceTree = ""; 292 | }; 293 | 832341B11AAA6A8300B99B32 /* Products */ = { 294 | isa = PBXGroup; 295 | children = ( 296 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 297 | ); 298 | name = Products; 299 | sourceTree = ""; 300 | }; 301 | 83CBB9F61A601CBA00E9B192 = { 302 | isa = PBXGroup; 303 | children = ( 304 | 13B07FAE1A68108700A75B9A /* app2 */, 305 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 306 | 00E356EF1AD99517003FC87E /* app2Tests */, 307 | 83CBBA001A601CBA00E9B192 /* Products */, 308 | ); 309 | indentWidth = 2; 310 | sourceTree = ""; 311 | tabWidth = 2; 312 | }; 313 | 83CBBA001A601CBA00E9B192 /* Products */ = { 314 | isa = PBXGroup; 315 | children = ( 316 | 13B07F961A680F5B00A75B9A /* app2.app */, 317 | 00E356EE1AD99517003FC87E /* app2Tests.xctest */, 318 | ); 319 | name = Products; 320 | sourceTree = ""; 321 | }; 322 | B1C5AE3A1DC9CA9100CF1D49 /* Products */ = { 323 | isa = PBXGroup; 324 | children = ( 325 | B1C5AE481DC9CA9100CF1D49 /* libspeech.a */, 326 | ); 327 | name = Products; 328 | sourceTree = ""; 329 | }; 330 | /* End PBXGroup section */ 331 | 332 | /* Begin PBXNativeTarget section */ 333 | 00E356ED1AD99517003FC87E /* app2Tests */ = { 334 | isa = PBXNativeTarget; 335 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "app2Tests" */; 336 | buildPhases = ( 337 | 00E356EA1AD99517003FC87E /* Sources */, 338 | 00E356EB1AD99517003FC87E /* Frameworks */, 339 | 00E356EC1AD99517003FC87E /* Resources */, 340 | ); 341 | buildRules = ( 342 | ); 343 | dependencies = ( 344 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 345 | ); 346 | name = app2Tests; 347 | productName = app2Tests; 348 | productReference = 00E356EE1AD99517003FC87E /* app2Tests.xctest */; 349 | productType = "com.apple.product-type.bundle.unit-test"; 350 | }; 351 | 13B07F861A680F5B00A75B9A /* app2 */ = { 352 | isa = PBXNativeTarget; 353 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "app2" */; 354 | buildPhases = ( 355 | 13B07F871A680F5B00A75B9A /* Sources */, 356 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 357 | 13B07F8E1A680F5B00A75B9A /* Resources */, 358 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 359 | ); 360 | buildRules = ( 361 | ); 362 | dependencies = ( 363 | ); 364 | name = app2; 365 | productName = "Hello World"; 366 | productReference = 13B07F961A680F5B00A75B9A /* app2.app */; 367 | productType = "com.apple.product-type.application"; 368 | }; 369 | /* End PBXNativeTarget section */ 370 | 371 | /* Begin PBXProject section */ 372 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 373 | isa = PBXProject; 374 | attributes = { 375 | LastUpgradeCheck = 610; 376 | ORGANIZATIONNAME = Facebook; 377 | TargetAttributes = { 378 | 00E356ED1AD99517003FC87E = { 379 | CreatedOnToolsVersion = 6.2; 380 | TestTargetID = 13B07F861A680F5B00A75B9A; 381 | }; 382 | }; 383 | }; 384 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "app2" */; 385 | compatibilityVersion = "Xcode 3.2"; 386 | developmentRegion = English; 387 | hasScannedForEncodings = 0; 388 | knownRegions = ( 389 | en, 390 | Base, 391 | ); 392 | mainGroup = 83CBB9F61A601CBA00E9B192; 393 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 394 | projectDirPath = ""; 395 | projectReferences = ( 396 | { 397 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 398 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 399 | }, 400 | { 401 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 402 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 403 | }, 404 | { 405 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 406 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 407 | }, 408 | { 409 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 410 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 411 | }, 412 | { 413 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 414 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 415 | }, 416 | { 417 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 418 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 419 | }, 420 | { 421 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 422 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 423 | }, 424 | { 425 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 426 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 427 | }, 428 | { 429 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 430 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 431 | }, 432 | { 433 | ProductGroup = 146834001AC3E56700842450 /* Products */; 434 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 435 | }, 436 | { 437 | ProductGroup = B1C5AE3A1DC9CA9100CF1D49 /* Products */; 438 | ProjectRef = FA87D6E659E44B43AAD13FBD /* speech.xcodeproj */; 439 | }, 440 | ); 441 | projectRoot = ""; 442 | targets = ( 443 | 13B07F861A680F5B00A75B9A /* app2 */, 444 | 00E356ED1AD99517003FC87E /* app2Tests */, 445 | ); 446 | }; 447 | /* End PBXProject section */ 448 | 449 | /* Begin PBXReferenceProxy section */ 450 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 451 | isa = PBXReferenceProxy; 452 | fileType = archive.ar; 453 | path = libRCTActionSheet.a; 454 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 455 | sourceTree = BUILT_PRODUCTS_DIR; 456 | }; 457 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 458 | isa = PBXReferenceProxy; 459 | fileType = archive.ar; 460 | path = libRCTGeolocation.a; 461 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 462 | sourceTree = BUILT_PRODUCTS_DIR; 463 | }; 464 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 465 | isa = PBXReferenceProxy; 466 | fileType = archive.ar; 467 | path = libRCTImage.a; 468 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 469 | sourceTree = BUILT_PRODUCTS_DIR; 470 | }; 471 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 472 | isa = PBXReferenceProxy; 473 | fileType = archive.ar; 474 | path = libRCTNetwork.a; 475 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 476 | sourceTree = BUILT_PRODUCTS_DIR; 477 | }; 478 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 479 | isa = PBXReferenceProxy; 480 | fileType = archive.ar; 481 | path = libRCTVibration.a; 482 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 483 | sourceTree = BUILT_PRODUCTS_DIR; 484 | }; 485 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 486 | isa = PBXReferenceProxy; 487 | fileType = archive.ar; 488 | path = libRCTSettings.a; 489 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 490 | sourceTree = BUILT_PRODUCTS_DIR; 491 | }; 492 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 493 | isa = PBXReferenceProxy; 494 | fileType = archive.ar; 495 | path = libRCTWebSocket.a; 496 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 497 | sourceTree = BUILT_PRODUCTS_DIR; 498 | }; 499 | 146834041AC3E56700842450 /* libReact.a */ = { 500 | isa = PBXReferenceProxy; 501 | fileType = archive.ar; 502 | path = libReact.a; 503 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 504 | sourceTree = BUILT_PRODUCTS_DIR; 505 | }; 506 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 507 | isa = PBXReferenceProxy; 508 | fileType = archive.ar; 509 | path = libRCTLinking.a; 510 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 511 | sourceTree = BUILT_PRODUCTS_DIR; 512 | }; 513 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 514 | isa = PBXReferenceProxy; 515 | fileType = archive.ar; 516 | path = libRCTText.a; 517 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 518 | sourceTree = BUILT_PRODUCTS_DIR; 519 | }; 520 | B1C5AE481DC9CA9100CF1D49 /* libspeech.a */ = { 521 | isa = PBXReferenceProxy; 522 | fileType = archive.ar; 523 | path = libspeech.a; 524 | remoteRef = B1C5AE471DC9CA9100CF1D49 /* PBXContainerItemProxy */; 525 | sourceTree = BUILT_PRODUCTS_DIR; 526 | }; 527 | /* End PBXReferenceProxy section */ 528 | 529 | /* Begin PBXResourcesBuildPhase section */ 530 | 00E356EC1AD99517003FC87E /* Resources */ = { 531 | isa = PBXResourcesBuildPhase; 532 | buildActionMask = 2147483647; 533 | files = ( 534 | ); 535 | runOnlyForDeploymentPostprocessing = 0; 536 | }; 537 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 538 | isa = PBXResourcesBuildPhase; 539 | buildActionMask = 2147483647; 540 | files = ( 541 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 542 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 543 | ); 544 | runOnlyForDeploymentPostprocessing = 0; 545 | }; 546 | /* End PBXResourcesBuildPhase section */ 547 | 548 | /* Begin PBXShellScriptBuildPhase section */ 549 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 550 | isa = PBXShellScriptBuildPhase; 551 | buildActionMask = 2147483647; 552 | files = ( 553 | ); 554 | inputPaths = ( 555 | ); 556 | name = "Bundle React Native code and images"; 557 | outputPaths = ( 558 | ); 559 | runOnlyForDeploymentPostprocessing = 0; 560 | shellPath = /bin/sh; 561 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; 562 | }; 563 | /* End PBXShellScriptBuildPhase section */ 564 | 565 | /* Begin PBXSourcesBuildPhase section */ 566 | 00E356EA1AD99517003FC87E /* Sources */ = { 567 | isa = PBXSourcesBuildPhase; 568 | buildActionMask = 2147483647; 569 | files = ( 570 | 00E356F31AD99517003FC87E /* app2Tests.m in Sources */, 571 | ); 572 | runOnlyForDeploymentPostprocessing = 0; 573 | }; 574 | 13B07F871A680F5B00A75B9A /* Sources */ = { 575 | isa = PBXSourcesBuildPhase; 576 | buildActionMask = 2147483647; 577 | files = ( 578 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 579 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 580 | ); 581 | runOnlyForDeploymentPostprocessing = 0; 582 | }; 583 | /* End PBXSourcesBuildPhase section */ 584 | 585 | /* Begin PBXTargetDependency section */ 586 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 587 | isa = PBXTargetDependency; 588 | target = 13B07F861A680F5B00A75B9A /* app2 */; 589 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 590 | }; 591 | /* End PBXTargetDependency section */ 592 | 593 | /* Begin PBXVariantGroup section */ 594 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 595 | isa = PBXVariantGroup; 596 | children = ( 597 | 13B07FB21A68108700A75B9A /* Base */, 598 | ); 599 | name = LaunchScreen.xib; 600 | path = app2; 601 | sourceTree = ""; 602 | }; 603 | /* End PBXVariantGroup section */ 604 | 605 | /* Begin XCBuildConfiguration section */ 606 | 00E356F61AD99517003FC87E /* Debug */ = { 607 | isa = XCBuildConfiguration; 608 | buildSettings = { 609 | BUNDLE_LOADER = "$(TEST_HOST)"; 610 | GCC_PREPROCESSOR_DEFINITIONS = ( 611 | "DEBUG=1", 612 | "$(inherited)", 613 | ); 614 | INFOPLIST_FILE = app2Tests/Info.plist; 615 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 616 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 617 | LIBRARY_SEARCH_PATHS = ( 618 | "$(inherited)", 619 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 620 | ); 621 | PRODUCT_NAME = "$(TARGET_NAME)"; 622 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/app2.app/app2"; 623 | }; 624 | name = Debug; 625 | }; 626 | 00E356F71AD99517003FC87E /* Release */ = { 627 | isa = XCBuildConfiguration; 628 | buildSettings = { 629 | BUNDLE_LOADER = "$(TEST_HOST)"; 630 | COPY_PHASE_STRIP = NO; 631 | INFOPLIST_FILE = app2Tests/Info.plist; 632 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 633 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 634 | LIBRARY_SEARCH_PATHS = ( 635 | "$(inherited)", 636 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 637 | ); 638 | PRODUCT_NAME = "$(TARGET_NAME)"; 639 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/app2.app/app2"; 640 | }; 641 | name = Release; 642 | }; 643 | 13B07F941A680F5B00A75B9A /* Debug */ = { 644 | isa = XCBuildConfiguration; 645 | buildSettings = { 646 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 647 | CURRENT_PROJECT_VERSION = 1; 648 | DEAD_CODE_STRIPPING = NO; 649 | HEADER_SEARCH_PATHS = ( 650 | "$(inherited)", 651 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 652 | "$(SRCROOT)/../node_modules/react-native/React/**", 653 | "$(SRCROOT)/../node_modules/react-native-speech/ios/speech/**", 654 | ); 655 | INFOPLIST_FILE = app2/Info.plist; 656 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 657 | OTHER_LDFLAGS = ( 658 | "$(inherited)", 659 | "-ObjC", 660 | "-lc++", 661 | ); 662 | PRODUCT_NAME = app2; 663 | VERSIONING_SYSTEM = "apple-generic"; 664 | }; 665 | name = Debug; 666 | }; 667 | 13B07F951A680F5B00A75B9A /* Release */ = { 668 | isa = XCBuildConfiguration; 669 | buildSettings = { 670 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 671 | CURRENT_PROJECT_VERSION = 1; 672 | HEADER_SEARCH_PATHS = ( 673 | "$(inherited)", 674 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 675 | "$(SRCROOT)/../node_modules/react-native/React/**", 676 | "$(SRCROOT)/../node_modules/react-native-speech/ios/speech/**", 677 | ); 678 | INFOPLIST_FILE = app2/Info.plist; 679 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 680 | OTHER_LDFLAGS = ( 681 | "$(inherited)", 682 | "-ObjC", 683 | "-lc++", 684 | ); 685 | PRODUCT_NAME = app2; 686 | VERSIONING_SYSTEM = "apple-generic"; 687 | }; 688 | name = Release; 689 | }; 690 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 691 | isa = XCBuildConfiguration; 692 | buildSettings = { 693 | ALWAYS_SEARCH_USER_PATHS = NO; 694 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 695 | CLANG_CXX_LIBRARY = "libc++"; 696 | CLANG_ENABLE_MODULES = YES; 697 | CLANG_ENABLE_OBJC_ARC = YES; 698 | CLANG_WARN_BOOL_CONVERSION = YES; 699 | CLANG_WARN_CONSTANT_CONVERSION = YES; 700 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 701 | CLANG_WARN_EMPTY_BODY = YES; 702 | CLANG_WARN_ENUM_CONVERSION = YES; 703 | CLANG_WARN_INT_CONVERSION = YES; 704 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 705 | CLANG_WARN_UNREACHABLE_CODE = YES; 706 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 707 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 708 | COPY_PHASE_STRIP = NO; 709 | ENABLE_STRICT_OBJC_MSGSEND = YES; 710 | GCC_C_LANGUAGE_STANDARD = gnu99; 711 | GCC_DYNAMIC_NO_PIC = NO; 712 | GCC_OPTIMIZATION_LEVEL = 0; 713 | GCC_PREPROCESSOR_DEFINITIONS = ( 714 | "DEBUG=1", 715 | "$(inherited)", 716 | ); 717 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 718 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 719 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 720 | GCC_WARN_UNDECLARED_SELECTOR = YES; 721 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 722 | GCC_WARN_UNUSED_FUNCTION = YES; 723 | GCC_WARN_UNUSED_VARIABLE = YES; 724 | HEADER_SEARCH_PATHS = ( 725 | "$(inherited)", 726 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 727 | "$(SRCROOT)/../node_modules/react-native/React/**", 728 | "$(SRCROOT)/../node_modules/react-native-speech/ios/speech/**", 729 | ); 730 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 731 | MTL_ENABLE_DEBUG_INFO = YES; 732 | ONLY_ACTIVE_ARCH = YES; 733 | SDKROOT = iphoneos; 734 | }; 735 | name = Debug; 736 | }; 737 | 83CBBA211A601CBA00E9B192 /* Release */ = { 738 | isa = XCBuildConfiguration; 739 | buildSettings = { 740 | ALWAYS_SEARCH_USER_PATHS = NO; 741 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 742 | CLANG_CXX_LIBRARY = "libc++"; 743 | CLANG_ENABLE_MODULES = YES; 744 | CLANG_ENABLE_OBJC_ARC = YES; 745 | CLANG_WARN_BOOL_CONVERSION = YES; 746 | CLANG_WARN_CONSTANT_CONVERSION = YES; 747 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 748 | CLANG_WARN_EMPTY_BODY = YES; 749 | CLANG_WARN_ENUM_CONVERSION = YES; 750 | CLANG_WARN_INT_CONVERSION = YES; 751 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 752 | CLANG_WARN_UNREACHABLE_CODE = YES; 753 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 754 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 755 | COPY_PHASE_STRIP = YES; 756 | ENABLE_NS_ASSERTIONS = NO; 757 | ENABLE_STRICT_OBJC_MSGSEND = YES; 758 | GCC_C_LANGUAGE_STANDARD = gnu99; 759 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 760 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 761 | GCC_WARN_UNDECLARED_SELECTOR = YES; 762 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 763 | GCC_WARN_UNUSED_FUNCTION = YES; 764 | GCC_WARN_UNUSED_VARIABLE = YES; 765 | HEADER_SEARCH_PATHS = ( 766 | "$(inherited)", 767 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 768 | "$(SRCROOT)/../node_modules/react-native/React/**", 769 | "$(SRCROOT)/../node_modules/react-native-speech/ios/speech/**", 770 | ); 771 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 772 | MTL_ENABLE_DEBUG_INFO = NO; 773 | SDKROOT = iphoneos; 774 | VALIDATE_PRODUCT = YES; 775 | }; 776 | name = Release; 777 | }; 778 | /* End XCBuildConfiguration section */ 779 | 780 | /* Begin XCConfigurationList section */ 781 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "app2Tests" */ = { 782 | isa = XCConfigurationList; 783 | buildConfigurations = ( 784 | 00E356F61AD99517003FC87E /* Debug */, 785 | 00E356F71AD99517003FC87E /* Release */, 786 | ); 787 | defaultConfigurationIsVisible = 0; 788 | defaultConfigurationName = Release; 789 | }; 790 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "app2" */ = { 791 | isa = XCConfigurationList; 792 | buildConfigurations = ( 793 | 13B07F941A680F5B00A75B9A /* Debug */, 794 | 13B07F951A680F5B00A75B9A /* Release */, 795 | ); 796 | defaultConfigurationIsVisible = 0; 797 | defaultConfigurationName = Release; 798 | }; 799 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "app2" */ = { 800 | isa = XCConfigurationList; 801 | buildConfigurations = ( 802 | 83CBBA201A601CBA00E9B192 /* Debug */, 803 | 83CBBA211A601CBA00E9B192 /* Release */, 804 | ); 805 | defaultConfigurationIsVisible = 0; 806 | defaultConfigurationName = Release; 807 | }; 808 | /* End XCConfigurationList section */ 809 | }; 810 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 811 | } 812 | --------------------------------------------------------------------------------