├── example ├── .watchmanconfig ├── .gitattributes ├── .babelrc ├── app.json ├── 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 │ │ │ │ │ └── example │ │ │ │ │ ├── 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 ├── ios │ ├── example │ │ ├── Images.xcassets │ │ │ ├── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── AppDelegate.m │ │ ├── Info.plist │ │ └── Base.lproj │ │ │ └── LaunchScreen.xib │ ├── exampleTests │ │ ├── Info.plist │ │ └── exampleTests.m │ ├── example-tvOSTests │ │ └── Info.plist │ ├── example-tvOS │ │ └── Info.plist │ └── example.xcodeproj │ │ ├── xcshareddata │ │ └── xcschemes │ │ │ ├── example.xcscheme │ │ │ └── example-tvOS.xcscheme │ │ └── project.pbxproj ├── .buckconfig ├── index.js ├── __tests__ │ └── App.js ├── package.json ├── .gitignore ├── App.js └── .flowconfig ├── .gitignore ├── .npmignore ├── index.js ├── package.json ├── LICENSE ├── lib ├── BoardProgress.js ├── paintbrush.js ├── BoardTitle.js ├── BoardNeedle.js └── index.js └── README.md /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } 4 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "displayName": "example" 4 | } -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | example 3 | 4 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /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/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './App'; 3 | 4 | AppRegistry.registerComponent('example', () => App); 5 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ljunb/react-native-instrument-board/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/ljunb/react-native-instrument-board/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/ljunb/react-native-instrument-board/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/ljunb/react-native-instrument-board/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/ljunb/react-native-instrument-board/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.[aod] 2 | *.DS_Store 3 | .DS_Store 4 | *Thumbs.db 5 | *.iml 6 | .gradle 7 | .idea 8 | node_modules 9 | npm-debug.log 10 | /android/build 11 | /ios/**/*xcuserdata* 12 | /ios/**/*xcshareddata* -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | 2 | *.[aod] 3 | *.DS_Store 4 | .DS_Store 5 | *Thumbs.db 6 | *.iml 7 | .gradle 8 | .idea 9 | node_modules 10 | npm-debug.log 11 | /android/build 12 | /ios/**/*xcuserdata* 13 | /ios/**/*xcshareddata* -------------------------------------------------------------------------------- /example/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Project - react-native-instrument-board 3 | * Author : ljunb 4 | * Date : 2017/11/23 下午10:40 5 | * Description : 入口文件 6 | */ 7 | import InstrumentBoard from './lib'; 8 | export default InstrumentBoard; -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example' 2 | include ':react-native-svg' 3 | project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') 4 | 5 | include ':app' 6 | -------------------------------------------------------------------------------- /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.14.1-all.zip 6 | -------------------------------------------------------------------------------- /example/__tests__/App.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import App from '../App'; 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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-instrument-board", 3 | "version": "0.0.3", 4 | "description": "", 5 | "main": "index.js", 6 | "directories": { 7 | "example": "example" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "author": "cookiej", 13 | "license": "MIT", 14 | "dependencies": { 15 | "react-native-svg": "^6.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 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 "example"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/example/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 | -------------------------------------------------------------------------------- /example/ios/example/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/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 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": "16.0.0", 11 | "react-native": "0.50.3", 12 | "react-native-instrument-board": "0.0.3", 13 | "react-native-svg": "^6.0.0" 14 | }, 15 | "devDependencies": { 16 | "babel-jest": "21.2.0", 17 | "babel-preset-react-native": "4.0.0", 18 | "jest": "21.2.1", 19 | "react-test-renderer": "16.0.0" 20 | }, 21 | "jest": { 22 | "preset": "react-native" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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:2.2.3' 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 | -------------------------------------------------------------------------------- /example/ios/example/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/ios/exampleTests/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 | -------------------------------------------------------------------------------- /example/ios/example-tvOSTests/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 | -------------------------------------------------------------------------------- /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/.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/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 CookieJ 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. -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.horcrux.svg.SvgPackage; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.shell.MainReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | return Arrays.asList( 26 | new MainReactPackage(), 27 | new SvgPackage() 28 | ); 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | }; 36 | 37 | @Override 38 | public ReactNativeHost getReactNativeHost() { 39 | return mReactNativeHost; 40 | } 41 | 42 | @Override 43 | public void onCreate() { 44 | super.onCreate(); 45 | SoLoader.init(this, /* native exopackage */ false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /example/App.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 | StyleSheet, 10 | View, 11 | Text, 12 | } from 'react-native'; 13 | import InstrumentBoard from 'react-native-instrument-board'; 14 | 15 | export default class App extends Component<{}> { 16 | state = { 17 | percentage: 0, 18 | }; 19 | 20 | handlePress = () => { 21 | if (this.state.percentage === 100) { 22 | this.setState({percentage: 0}); 23 | } if (this.state.percentage + 10.5 >= 100) { 24 | this.setState({percentage: 100}); 25 | }else { 26 | this.setState({percentage: this.state.percentage + 10.5}); 27 | } 28 | }; 29 | 30 | render() { 31 | return ( 32 | 33 | 34 | 增加 35 | 36 | ); 37 | } 38 | } 39 | 40 | const styles = StyleSheet.create({ 41 | container: { 42 | flex: 1, 43 | justifyContent: 'center', 44 | alignItems: 'center', 45 | backgroundColor: '#F5FCFF', 46 | }, 47 | welcome: { 48 | fontSize: 20, 49 | textAlign: 'center', 50 | margin: 10, 51 | }, 52 | instructions: { 53 | textAlign: 'center', 54 | color: '#333333', 55 | marginBottom: 5, 56 | }, 57 | }); 58 | -------------------------------------------------------------------------------- /lib/BoardProgress.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Project - react-native-instrument-board 3 | * Author : ljunb 4 | * Date : 2017/11/22 下午8:33 5 | * Description : 内部的进度弧圈 6 | */ 7 | import React, { Component } from 'react' 8 | import { 9 | G, 10 | Path, 11 | } from 'react-native-svg'; 12 | import paintbrush from './paintbrush'; 13 | 14 | export default class BoardProgress extends Component { 15 | 16 | constructor(props) { 17 | super(props); 18 | this.state = { 19 | endAngle: props.endAngle 20 | } 21 | } 22 | 23 | componentWillReceiveProps(nextProps) { 24 | if (nextProps.endAngle !== this.props.endAngle) { 25 | this.setState({endAngle: nextProps.endAngle}) 26 | } 27 | } 28 | 29 | render() { 30 | const { 31 | progressRadius, radius, startAngle, totalAngle, 32 | progressColor, progressBackgroundColor 33 | } = this.props; 34 | const {endAngle} = this.state; 35 | 36 | return ( 37 | 38 | 44 | 50 | 51 | ) 52 | } 53 | } -------------------------------------------------------------------------------- /example/ios/example/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 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"example" 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 | -------------------------------------------------------------------------------- /lib/paintbrush.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Project - react-native-instrument-board 3 | * Author : ljunb 4 | * Date : 2017/11/22 下午9:24 5 | * Description : 画笔类 6 | */ 7 | class Paintbrush { 8 | 9 | /** 10 | * 绘制弧线 11 | * 12 | * @param {Number} outerRadius 外层半径 13 | * @param {Number} innerRadius 内层半径 14 | * @param {Number} startAngle 起始点角度,0-360 15 | * @param {Number} endAngle 结束点角度,0-360 16 | * @param {Boolean} progress 是否绘制进度条,这里用于区分svg的镜像取值 17 | * @return {String} svg绘制语句 18 | */ 19 | static drawArc = (outerRadius, innerRadius, startAngle, endAngle, progress = false) => { 20 | const {x: startX, y: startY} = Paintbrush.drawPoint(outerRadius, innerRadius, startAngle); 21 | const {x: endX, y: endY} = Paintbrush.drawPoint(outerRadius, innerRadius, endAngle); 22 | 23 | let mirrorImage = 0; 24 | if (progress) { 25 | mirrorImage = endAngle - startAngle >= 180 ? 1 : 0; 26 | } 27 | 28 | return `M ${startX} ${startY} A ${innerRadius} ${innerRadius} 0 ${mirrorImage} 1 ${endX} ${endY}`; 29 | }; 30 | 31 | /** 32 | * 绘制点 33 | * 34 | * @param {Number} outerRadius 外层半径 35 | * @param {Number} innerRadius 内层半径 36 | * @param {Number} angle 点角度,0-360 37 | * @return {Object} 一个点对象{x, y} 38 | */ 39 | static drawPoint = (outerRadius, innerRadius, angle) => { 40 | const x = outerRadius + innerRadius * Math.sin(2 * Math.PI / 360 * (360 - angle)); 41 | const y = outerRadius + innerRadius * Math.cos(2 * Math.PI / 360 * angle); 42 | return {x, y}; 43 | }; 44 | } 45 | 46 | export default Paintbrush; -------------------------------------------------------------------------------- /lib/BoardTitle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Project - react-native-instrument-board 3 | * Author : ljunb 4 | * Date : 2017/11/22 下午8:33 5 | * Description : 底部中间的标题和副标题 6 | */ 7 | import React, {Component} from 'react' 8 | import { 9 | View, 10 | Text 11 | } from 'react-native'; 12 | 13 | export default class BoardTitle extends Component { 14 | 15 | constructor(props) { 16 | super(props); 17 | this.state = { 18 | title: props.title, 19 | } 20 | } 21 | 22 | componentWillReceiveProps(nextProps) { 23 | if (nextProps.title !== this.props.title) { 24 | this.setState({title: nextProps.title}) 25 | } 26 | } 27 | 28 | render() { 29 | const {title} = this.state; 30 | const {startAngle, radius, innerRadius, subTitle} = this.props; 31 | const x1 = radius + innerRadius * Math.sin(2 * Math.PI / 360 * (360 - startAngle)); 32 | const x2 = radius - innerRadius * Math.sin(2 * Math.PI / 360 * startAngle); 33 | const y = radius + innerRadius * Math.cos(2 * Math.PI / 360 * startAngle); 34 | let sourceTitle = title.toFixed(2); 35 | if (Math.floor(sourceTitle) == sourceTitle) { 36 | sourceTitle = title.toFixed(0); 37 | } 38 | 39 | return ( 40 | 41 | {sourceTitle} 42 | {subTitle} 43 | 44 | ) 45 | } 46 | } -------------------------------------------------------------------------------- /example/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | [include] 20 | 21 | [libs] 22 | node_modules/react-native/Libraries/react-native/react-native-interface.js 23 | node_modules/react-native/flow/ 24 | 25 | [options] 26 | emoji=true 27 | 28 | module.system=haste 29 | 30 | munge_underscores=true 31 | 32 | 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' 33 | 34 | suppress_type=$FlowIssue 35 | suppress_type=$FlowFixMe 36 | suppress_type=$FlowFixMeProps 37 | suppress_type=$FlowFixMeState 38 | suppress_type=$FixMe 39 | 40 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 41 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 42 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 43 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 44 | 45 | unsafe.enable_getters_and_setters=true 46 | 47 | [version] 48 | ^0.56.0 49 | -------------------------------------------------------------------------------- /example/ios/example-tvOS/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 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /example/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.example", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.example", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /example/ios/example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | NSLocationWhenInUseUsageDescription 42 | 43 | NSAppTransportSecurity 44 | 45 | 46 | NSExceptionDomains 47 | 48 | localhost 49 | 50 | NSExceptionAllowsInsecureHTTPLoads 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /lib/BoardNeedle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Project - react-native-instrument-board 3 | * Author : ljunb 4 | * Date : 2017/11/22 下午8:33 5 | * Description : 中间仪表盘针 6 | */ 7 | import React, {Component} from 'react' 8 | import { 9 | Polyline, 10 | G, 11 | Circle, 12 | } from 'react-native-svg'; 13 | import paintbrush from './paintbrush'; 14 | 15 | export default class BoardNeedle extends Component { 16 | 17 | constructor(props) { 18 | super(props); 19 | this.state = this.convertAngle(props); 20 | } 21 | 22 | componentWillReceiveProps(nextProps) { 23 | if (nextProps.angle !== this.props.angle) { 24 | this.setState(this.convertAngle(nextProps)) 25 | } 26 | } 27 | 28 | convertAngle = ({radius, needleRadius, centerSpotRadius, angle, needleAngle}) => { 29 | // 画箭头 30 | const {x: x1, y: y1} = paintbrush.drawPoint(radius, needleRadius, angle); 31 | const {x: x2, y: y2} = paintbrush.drawPoint(radius, centerSpotRadius, angle - needleAngle / 2); 32 | const {x: x3, y: y3} = paintbrush.drawPoint(radius, centerSpotRadius, angle + needleAngle / 2); 33 | 34 | // 里层灰色 35 | const {x: x4, y: y4} = paintbrush.drawPoint(radius, centerSpotRadius - 5, angle); 36 | const {x: x5, y: y5} = paintbrush.drawPoint(radius, centerSpotRadius - 5, angle - needleAngle / 2); 37 | 38 | return {x1, y1, x2, y2, x3, y3, x4, y4, x5, y5} 39 | }; 40 | 41 | render() { 42 | const {x1, y1, x2, y2, x3, y3, x4, y4, x5, y5} = this.state; 43 | 44 | return ( 45 | 46 | 52 | 60 | 61 | 65 | 69 | 70 | ) 71 | } 72 | } -------------------------------------------------------------------------------- /example/ios/exampleTests/exampleTests.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 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface exampleTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation exampleTests 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 = [[[RCTSharedApplication() 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-instrument-board 2 | 3 | [![npm](https://img.shields.io/npm/v/react-native-instrument-board.svg)](https://www.npmjs.com/package/react-native-instrument-board) 4 | [![npm](https://img.shields.io/npm/dt/react-native-instrument-board.svg)](https://www.npmjs.com/package/react-native-instrument-board) 5 | [![npm](https://img.shields.io/npm/l/react-native-instrument-board.svg)](https://github.com/ljunb/react-native-instrument-board/blob/master/LICENSE) 6 | 7 | 该组件源于公司项目,当前业务主要用于反馈买车用户的一个消费态度,工作之余就将其抽取出来了。主要还是当做一个记录,如果后续时间允许,会考虑写一篇关于做这个组件的文章,写写当时遇到的问题和一些技术点。组件依赖于`react-native-svg`,所以基本是`SVG`绘制语句的应用。目前测试情况来看,可能需要 RN >= 0.50.0 😶😶~ 8 | 9 | 如果你想在项目中使用,Android 下可能需要修改项目的 support 包到 25 版本,如 `example` 中的 [gradle 文件](https://github.com/ljunb/react-native-instrument-board/blob/master/example/android/app/build.gradle) 所示。 10 | 11 | ## 示例效果 12 | ![demo](https://github.com/ljunb/screenshots/blob/master/instrument_board.jpeg) 13 | 14 | ## 安装 15 | 16 | 使用`npm`: 17 | ``` 18 | npm install react-native-instrument-board --save 19 | ``` 20 | 用`yarn`: 21 | ``` 22 | yarn add react-native-instrument-board 23 | ``` 24 | 安装后,需要执行以下命令: 25 | ``` 26 | react-native link react-native-svg 27 | ``` 28 | 29 | ## 运行example 30 | 进入项目根目录 31 | ``` 32 | cd example 33 | npm install 34 | react-native run-ios/run-android 35 | ``` 36 | 37 | ## 参数 38 | 39 | 名称 | 类型 | 默认值 | 参数描述 40 | ---------------- | ------ | -------- | ----------- 41 | percentage | number | 80 | 进度百分比,内圈红色部分,范围0-100 42 | radius | number | 150 | 仪表盘半径,注意是外圈半径 43 | strokeWidth | number | 8 | 仪表盘边框宽度 44 | startAngle | number | 36 | 仪表盘0°位置的角度,以经过仪表盘圆点的垂直线作为基准,顺时针方向的角度 45 | contentStrokeColors | array | [颜色数组] | 仪表盘每个区间的边框颜色,与区间个数对应,数组格式 46 | degreeTexts | array | ['0', '1.0', '2.0', '3.0', '4.0'] | 仪表盘刻度值数组 47 | degreeTextRadius | number | 118 | 仪表盘刻度值的半径,决定了刻度值的显示位置 48 | degreeTextStartOffset | array | ['4%', '0', '0', '0'] | 用于调整仪表盘刻度值偏移量的数组 49 | degreeTextColor | string | '#999' | 刻度值文本颜色 50 | contentTexts | array | ['精打细算', '理想消费', '不差钱', '有的是钱'] | 仪表盘分段内容的数组 51 | contentTextRadius | number | 120 | 类似于`degreeTextRadius`仪表盘分段内容的半径,决定了内容区的显示位置 52 | contentTextStartOffset | array | ['28%', '28%', '35%', '28%'] | 类似于`degreeTextStartOffset`,用于调整内容区文本的偏移量 53 | contentTextColor | string | '#999' | 仪表盘分段内容的文本颜色 54 | progressRadius | number | 110 | 进度条半径 55 | progressBackgroundColor | string | '#ccc' | 进度条背景颜色 56 | progressRadius | string | 'rgb(234, 0, 22)' | 进度条指示颜色 57 | needleRadius | number | 80 | 仪表盘指针半径,指圆心至针尖之间长度 58 | needleAngle | number | 60 | 仪表盘指针角度,指针在中心圆边缘上所占的扇形角度 59 | centerSpotRadius | number | 16 | 仪表盘中心圆半径 60 | animated | bool | true | 是否开启动画,暂时只有`Animated.spring`模式 61 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | # TextLayoutBuilder uses a non-public Android constructor within StaticLayout. 54 | # See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. 55 | -dontwarn android.text.StaticLayout 56 | 57 | # okhttp 58 | 59 | -keepattributes Signature 60 | -keepattributes *Annotation* 61 | -keep class okhttp3.** { *; } 62 | -keep interface okhttp3.** { *; } 63 | -dontwarn okhttp3.** 64 | 65 | # okio 66 | 67 | -keep class sun.misc.Unsafe { *; } 68 | -dontwarn java.nio.file.* 69 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 70 | -dontwarn okio.** 71 | -------------------------------------------------------------------------------- /example/ios/example/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/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 62 | 68 | 69 | 70 | 71 | 72 | 78 | 79 | 80 | 81 | 82 | 83 | 94 | 96 | 102 | 103 | 104 | 105 | 106 | 107 | 113 | 115 | 121 | 122 | 123 | 124 | 126 | 127 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /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 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 37 | * // for example: to disable dev mode in the staging build type (if configured) 38 | * devDisabledInStaging: true, 39 | * // The configuration property can be in the following formats 40 | * // 'devDisabledIn${productFlavor}${buildType}' 41 | * // 'devDisabledIn${buildType}' 42 | * 43 | * // the root of your project, i.e. where "package.json" lives 44 | * root: "../../", 45 | * 46 | * // where to put the JS bundle asset in debug mode 47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 48 | * 49 | * // where to put the JS bundle asset in release mode 50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 51 | * 52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 53 | * // require('./image.png')), in debug mode 54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 55 | * 56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 57 | * // require('./image.png')), in release mode 58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 59 | * 60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 64 | * // for example, you might want to remove it from here. 65 | * inputExcludes: ["android/**", "ios/**"], 66 | * 67 | * // override which node gets called and with what additional arguments 68 | * nodeExecutableAndArgs: ["node"], 69 | * 70 | * // supply additional arguments to the packager 71 | * extraPackagerArgs: [] 72 | * ] 73 | */ 74 | 75 | project.ext.react = [ 76 | entryFile: "index.js" 77 | ] 78 | 79 | apply from: "../../node_modules/react-native/react.gradle" 80 | 81 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = false 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = false 95 | 96 | android { 97 | compileSdkVersion 25 98 | buildToolsVersion "25.0.3" 99 | 100 | defaultConfig { 101 | applicationId "com.example" 102 | minSdkVersion 16 103 | targetSdkVersion 22 104 | versionCode 1 105 | versionName "1.0" 106 | ndk { 107 | abiFilters "armeabi-v7a", "x86" 108 | } 109 | } 110 | splits { 111 | abi { 112 | reset() 113 | enable enableSeparateBuildPerCPUArchitecture 114 | universalApk false // If true, also generate a universal APK 115 | include "armeabi-v7a", "x86" 116 | } 117 | } 118 | buildTypes { 119 | release { 120 | minifyEnabled enableProguardInReleaseBuilds 121 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 122 | } 123 | } 124 | // applicationVariants are e.g. debug, release 125 | applicationVariants.all { variant -> 126 | variant.outputs.each { output -> 127 | // For each separate APK per architecture, set a unique version code as described here: 128 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 129 | def versionCodes = ["armeabi-v7a":1, "x86":2] 130 | def abi = output.getFilter(OutputFile.ABI) 131 | if (abi != null) { // null for the universal-debug, universal-release variants 132 | output.versionCodeOverride = 133 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 134 | } 135 | } 136 | } 137 | } 138 | 139 | dependencies { 140 | compile project(':react-native-svg') 141 | compile fileTree(dir: "libs", include: ["*.jar"]) 142 | compile "com.android.support:appcompat-v7:25.3.1" 143 | compile "com.facebook.react:react-native:+" // From node_modules 144 | } 145 | 146 | // Run this once to be able to run the application with BUCK 147 | // puts all compile dependencies into folder libs for BUCK to use 148 | task copyDownloadableDepsToLibs(type: Copy) { 149 | from configurations.compile 150 | into 'libs' 151 | } 152 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Project - react-native-instrument-board 3 | * Author : ljunb 4 | * Date : 2017/11/22 下午8:33 5 | * Description : 简易的仪表盘组件 6 | */ 7 | 8 | import React, {Component} from 'react'; 9 | import { 10 | View, 11 | Animated, 12 | } from 'react-native'; 13 | 14 | import Svg, { 15 | Path, 16 | Text, 17 | Defs, 18 | TextPath, 19 | G, 20 | } from 'react-native-svg'; 21 | import PropTypes from 'prop-types'; 22 | import BoardNeedle from './BoardNeedle'; 23 | import BoardProgress from './BoardProgress'; 24 | import paintbrush from './paintbrush'; 25 | import BoardTitle from "./BoardTitle"; 26 | 27 | const AnimatedBoardNeedle = Animated.createAnimatedComponent(BoardNeedle); 28 | const AnimatedBoardProgress = Animated.createAnimatedComponent(BoardProgress); 29 | const AnimatedBoardTitle = Animated.createAnimatedComponent(BoardTitle); 30 | 31 | export default class InstrumentBoard extends Component { 32 | static propTypes = { 33 | // 百分比,0-100 34 | percentage: PropTypes.number, 35 | // 整体半径,指外圈 36 | radius: PropTypes.number, 37 | // 边框宽度 38 | strokeWidth: PropTypes.number, 39 | // 开始的角度,0-360 40 | startAngle: PropTypes.number, 41 | // 区域的边框颜色 42 | contentStrokeColors: PropTypes.array, 43 | // 刻度值文本数组 44 | degreeTexts: PropTypes.array, 45 | // 刻度值半径 46 | degreeTextRadius: PropTypes.number, 47 | // 刻度值文本偏移量数组 48 | degreeTextStartOffset: PropTypes.array, 49 | // 刻度值文本颜色 50 | degreeTextColor: PropTypes.string, 51 | // 区域内容文本数组 52 | contentTexts: PropTypes.array, 53 | // 区域内容半径 54 | contentTextRadius: PropTypes.number, 55 | // 区域内容文本偏移量数组 56 | contentTextStartOffset: PropTypes.array, 57 | // 区域内容文本颜色 58 | contentTextColor: PropTypes.string, 59 | // 进度条半径 60 | progressRadius: PropTypes.number, 61 | // 进度条颜色 62 | progressColor: PropTypes.string, 63 | // 进度条背景色 64 | progressBackgroundColor: PropTypes.string, 65 | // 指示针半径 66 | needleRadius: PropTypes.number, 67 | // 指示箭头角度(决定箭头宽度) 68 | needleAngle: PropTypes.number, 69 | // 指示箭头中心圆点半径 70 | centerSpotRadius: PropTypes.number, 71 | // 是否开启动画 72 | animated: PropTypes.bool, 73 | }; 74 | 75 | static defaultProps = { 76 | percentage: 80, 77 | radius: 150, 78 | strokeWidth: 8, 79 | degreeTexts: ['0', '1.0', '2.0', '3.0', '4.0'], 80 | degreeTextStartOffset: ['4%', '0', '0', '0'], 81 | degreeTextColor: '#999', 82 | contentTexts: ['精打细算', '理想消费', '不差钱', '有的是钱'], 83 | contentTextStartOffset: ['28%', '28%', '35%', '28%'], 84 | contentStrokeColors: ['rgb(11, 86, 215)', 'rgb(26, 189, 131)', 'rgb(248, 145, 7)', 'rgb(234, 0, 22)'], 85 | contentTextColor: '#999', 86 | startAngle: 36, 87 | progressRadius: 110, 88 | progressColor: 'rgb(234, 0, 22)', 89 | progressBackgroundColor: '#ccc', 90 | needleRadius: 80, 91 | needleAngle: 60, 92 | centerSpotRadius: 16, 93 | contentTextRadius: 120, 94 | degreeTextRadius: 118, 95 | animated: true, 96 | }; 97 | 98 | constructor(props) { 99 | super(props); 100 | this.state = { 101 | percentage: props.percentage, 102 | }; 103 | this.degreeTextKeys = this.makePathKeys(props.degreeTexts); 104 | this.contentTextKeys = this.makePathKeys(props.contentTexts); 105 | } 106 | 107 | degAnimatedValue = new Animated.Value(0); 108 | 109 | componentDidMount() { 110 | this.startDrawInRect(); 111 | } 112 | 113 | componentWillReceiveProps(nextProps) { 114 | const {percentage} = this.props; 115 | if (percentage !== nextProps.percentage) { 116 | this.setState({percentage: nextProps.percentage}, this.startDrawInRect) 117 | } 118 | } 119 | 120 | // 创建TextPath的id引用 121 | makePathKeys = textArr => textArr.map((item, key) => `TextPath_${item}_${key}`); 122 | 123 | definedDegreeTextPath = ((id, index) => { 124 | const {radius, startAngle, degreeTextRadius, contentTexts} = this.props; 125 | // 可旋转的总角度 126 | const totalAngle = (360 - startAngle * 2); 127 | // 每个区域的角度大小 128 | const contentAngle = totalAngle / contentTexts.length; 129 | 130 | const startA = startAngle + contentAngle * index - 4; 131 | const endA = startAngle + contentAngle * (index + 1); 132 | return ( 133 | 138 | ) 139 | }); 140 | 141 | definedContentTextPath = ((id, index) => { 142 | const {radius, startAngle, contentTextRadius, contentTexts} = this.props; 143 | // 可旋转的总角度 144 | const totalAngle = (360 - startAngle * 2); 145 | // 每个区域的角度大小 146 | const contentAngle = totalAngle / contentTexts.length; 147 | 148 | const startA = startAngle + contentAngle * index; 149 | const endA = startAngle + contentAngle * (index + 1); 150 | return ( 151 | 156 | ) 157 | }); 158 | 159 | drawContentStrokeItem = ((color, index) => { 160 | const {radius, strokeWidth, startAngle, contentTexts} = this.props; 161 | // 可旋转的总角度 162 | const totalAngle = (360 - startAngle * 2); 163 | // 每个区域的角度大小 164 | const contentAngle = totalAngle / contentTexts.length; 165 | // 除去strokeWidth的内层半径 166 | const innerRadius = radius - strokeWidth; 167 | 168 | const startA = startAngle + contentAngle * index; 169 | const endA = startAngle + contentAngle * (index + 1); 170 | const isLast = this.props.contentStrokeColors.length === index + 1; 171 | return ( 172 | 173 | 180 | 186 | {isLast && 187 | 193 | } 194 | 195 | ) 196 | }); 197 | 198 | drawDegreeTextItem = ((key, index) => { 199 | return ( 200 | 201 | 202 | {this.props.degreeTexts[index]} 203 | 204 | 205 | ) 206 | }); 207 | 208 | drawContentTextItem = ((key, index) => { 209 | return ( 210 | 211 | 212 | {this.props.contentTexts[index]} 213 | 214 | 215 | ) 216 | }); 217 | 218 | render() { 219 | const { 220 | centerSpotRadius, needleAngle, 221 | radius, startAngle, degreeTexts, contentTexts, 222 | progressColor, progressBackgroundColor, 223 | degreeTextColor, contentTextColor 224 | } = this.props; 225 | 226 | const lastItem = degreeTexts[degreeTexts.length - 1]; 227 | // 可旋转的总角度 228 | const totalAngle = (360 - startAngle * 2); 229 | 230 | const arrowAnimatedAngle = this.degAnimatedValue.interpolate({ 231 | inputRange: [0, this.state.percentage], 232 | outputRange: [startAngle, this.state.percentage / 100 * totalAngle + startAngle] 233 | }); 234 | 235 | const progressAnimatedValue = this.degAnimatedValue.interpolate({ 236 | inputRange: [0, this.state.percentage], 237 | outputRange: [startAngle, startAngle + (this.state.percentage / 100 * totalAngle)] 238 | }); 239 | 240 | const titleValue = this.degAnimatedValue.interpolate({ 241 | inputRange: [0, this.state.percentage], 242 | outputRange: [0, this.state.percentage / 100 * lastItem] 243 | }); 244 | 245 | return ( 246 | 247 | 248 | 249 | {this.degreeTextKeys.map(this.definedDegreeTextPath)} 250 | {this.contentTextKeys.map(this.definedContentTextPath)} 251 | 252 | {this.props.contentStrokeColors.map(this.drawContentStrokeItem)} 253 | {this.degreeTextKeys.map(this.drawDegreeTextItem)} 254 | {this.contentTextKeys.map(this.drawContentTextItem)} 255 | 264 | 271 | 272 | 279 | 280 | ); 281 | } 282 | 283 | getContentTextIndex = () => { 284 | const { percentage } = this.state; 285 | const { contentTexts } = this.props; 286 | const findIndex = Math.floor(percentage / (100 / contentTexts.length)); 287 | return findIndex === contentTexts.length ? (findIndex - 1) : findIndex; 288 | }; 289 | 290 | startDrawInRect = () => { 291 | if (this.props.animated) { 292 | Animated.spring(this.degAnimatedValue, { 293 | toValue: this.state.percentage, 294 | }).start(); 295 | } else { 296 | this.degAnimatedValue.setValue(this.state.percentage); 297 | } 298 | }; 299 | } -------------------------------------------------------------------------------- /example/ios/example.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 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.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 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 26 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 27 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 28 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 29 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 30 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; 31 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; 32 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; 33 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 34 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 35 | 2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */; }; 36 | 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; 37 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 38 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 39 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; 40 | D341DB1D188A43DCA9230F6E /* libRNSVG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B95FD41B4B6435FAD872264 /* libRNSVG.a */; }; 41 | /* End PBXBuildFile section */ 42 | 43 | /* Begin PBXContainerItemProxy section */ 44 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 49 | remoteInfo = RCTActionSheet; 50 | }; 51 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 56 | remoteInfo = RCTGeolocation; 57 | }; 58 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 61 | proxyType = 2; 62 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 63 | remoteInfo = RCTImage; 64 | }; 65 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 68 | proxyType = 2; 69 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 70 | remoteInfo = RCTNetwork; 71 | }; 72 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 75 | proxyType = 2; 76 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 77 | remoteInfo = RCTVibration; 78 | }; 79 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 82 | proxyType = 1; 83 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 84 | remoteInfo = example; 85 | }; 86 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 87 | isa = PBXContainerItemProxy; 88 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 89 | proxyType = 2; 90 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 91 | remoteInfo = RCTSettings; 92 | }; 93 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 94 | isa = PBXContainerItemProxy; 95 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 96 | proxyType = 2; 97 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 98 | remoteInfo = RCTWebSocket; 99 | }; 100 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 101 | isa = PBXContainerItemProxy; 102 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 103 | proxyType = 2; 104 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 105 | remoteInfo = React; 106 | }; 107 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { 108 | isa = PBXContainerItemProxy; 109 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 110 | proxyType = 1; 111 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; 112 | remoteInfo = "example-tvOS"; 113 | }; 114 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 115 | isa = PBXContainerItemProxy; 116 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 117 | proxyType = 2; 118 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 119 | remoteInfo = "RCTImage-tvOS"; 120 | }; 121 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { 122 | isa = PBXContainerItemProxy; 123 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 124 | proxyType = 2; 125 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 126 | remoteInfo = "RCTLinking-tvOS"; 127 | }; 128 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 129 | isa = PBXContainerItemProxy; 130 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 131 | proxyType = 2; 132 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 133 | remoteInfo = "RCTNetwork-tvOS"; 134 | }; 135 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 136 | isa = PBXContainerItemProxy; 137 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 138 | proxyType = 2; 139 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 140 | remoteInfo = "RCTSettings-tvOS"; 141 | }; 142 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { 143 | isa = PBXContainerItemProxy; 144 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 145 | proxyType = 2; 146 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 147 | remoteInfo = "RCTText-tvOS"; 148 | }; 149 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { 150 | isa = PBXContainerItemProxy; 151 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 152 | proxyType = 2; 153 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 154 | remoteInfo = "RCTWebSocket-tvOS"; 155 | }; 156 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { 157 | isa = PBXContainerItemProxy; 158 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 159 | proxyType = 2; 160 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 161 | remoteInfo = "React-tvOS"; 162 | }; 163 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { 164 | isa = PBXContainerItemProxy; 165 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 166 | proxyType = 2; 167 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 168 | remoteInfo = yoga; 169 | }; 170 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { 171 | isa = PBXContainerItemProxy; 172 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 173 | proxyType = 2; 174 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 175 | remoteInfo = "yoga-tvOS"; 176 | }; 177 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { 178 | isa = PBXContainerItemProxy; 179 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 180 | proxyType = 2; 181 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 182 | remoteInfo = cxxreact; 183 | }; 184 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 185 | isa = PBXContainerItemProxy; 186 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 187 | proxyType = 2; 188 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 189 | remoteInfo = "cxxreact-tvOS"; 190 | }; 191 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 192 | isa = PBXContainerItemProxy; 193 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 194 | proxyType = 2; 195 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; 196 | remoteInfo = jschelpers; 197 | }; 198 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 199 | isa = PBXContainerItemProxy; 200 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 201 | proxyType = 2; 202 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; 203 | remoteInfo = "jschelpers-tvOS"; 204 | }; 205 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 206 | isa = PBXContainerItemProxy; 207 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 208 | proxyType = 2; 209 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 210 | remoteInfo = RCTAnimation; 211 | }; 212 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 213 | isa = PBXContainerItemProxy; 214 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 215 | proxyType = 2; 216 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 217 | remoteInfo = "RCTAnimation-tvOS"; 218 | }; 219 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 220 | isa = PBXContainerItemProxy; 221 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 222 | proxyType = 2; 223 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 224 | remoteInfo = RCTLinking; 225 | }; 226 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 227 | isa = PBXContainerItemProxy; 228 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 229 | proxyType = 2; 230 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 231 | remoteInfo = RCTText; 232 | }; 233 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { 234 | isa = PBXContainerItemProxy; 235 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 236 | proxyType = 2; 237 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814; 238 | remoteInfo = RCTBlob; 239 | }; 240 | ECBEB22F1FC709F800F8DEE9 /* PBXContainerItemProxy */ = { 241 | isa = PBXContainerItemProxy; 242 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 243 | proxyType = 2; 244 | remoteGlobalIDString = ADD01A681E09402E00F6D226; 245 | remoteInfo = "RCTBlob-tvOS"; 246 | }; 247 | ECBEB2411FC709F800F8DEE9 /* PBXContainerItemProxy */ = { 248 | isa = PBXContainerItemProxy; 249 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 250 | proxyType = 2; 251 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; 252 | remoteInfo = fishhook; 253 | }; 254 | ECBEB2431FC709F800F8DEE9 /* PBXContainerItemProxy */ = { 255 | isa = PBXContainerItemProxy; 256 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 257 | proxyType = 2; 258 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; 259 | remoteInfo = "fishhook-tvOS"; 260 | }; 261 | ECBEB2491FC709F800F8DEE9 /* PBXContainerItemProxy */ = { 262 | isa = PBXContainerItemProxy; 263 | containerPortal = 1F9837660811487392D4C675 /* RNSVG.xcodeproj */; 264 | proxyType = 2; 265 | remoteGlobalIDString = 0CF68AC11AF0540F00FF9E5C; 266 | remoteInfo = RNSVG; 267 | }; 268 | ECBEB24B1FC709F800F8DEE9 /* PBXContainerItemProxy */ = { 269 | isa = PBXContainerItemProxy; 270 | containerPortal = 1F9837660811487392D4C675 /* RNSVG.xcodeproj */; 271 | proxyType = 2; 272 | remoteGlobalIDString = 94DDAC5C1F3D024300EED511; 273 | remoteInfo = "RNSVG-tvOS"; 274 | }; 275 | /* End PBXContainerItemProxy section */ 276 | 277 | /* Begin PBXFileReference section */ 278 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 279 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 280 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 281 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 282 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 283 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 284 | 00E356EE1AD99517003FC87E /* exampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = exampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 285 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 286 | 00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = ""; }; 287 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 288 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 289 | 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 290 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; }; 291 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; }; 292 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 293 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; }; 294 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; }; 295 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; }; 296 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 297 | 1B95FD41B4B6435FAD872264 /* libRNSVG.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSVG.a; sourceTree = ""; }; 298 | 1F9837660811487392D4C675 /* RNSVG.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSVG.xcodeproj; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = ""; }; 299 | 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 300 | 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 301 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 302 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 303 | 7DFD2AB0A35F4B4DAA6ED47F /* libRNSVG-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNSVG-tvOS.a"; sourceTree = ""; }; 304 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 305 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; 306 | /* End PBXFileReference section */ 307 | 308 | /* Begin PBXFrameworksBuildPhase section */ 309 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 310 | isa = PBXFrameworksBuildPhase; 311 | buildActionMask = 2147483647; 312 | files = ( 313 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 318 | isa = PBXFrameworksBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 322 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 323 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 324 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 325 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 326 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 327 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 328 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 329 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 330 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 331 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 332 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 333 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 334 | D341DB1D188A43DCA9230F6E /* libRNSVG.a in Frameworks */, 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | }; 338 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 339 | isa = PBXFrameworksBuildPhase; 340 | buildActionMask = 2147483647; 341 | files = ( 342 | 2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */, 343 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, 344 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 345 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 346 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 347 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 348 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 349 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 354 | isa = PBXFrameworksBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | }; 360 | /* End PBXFrameworksBuildPhase section */ 361 | 362 | /* Begin PBXGroup section */ 363 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 364 | isa = PBXGroup; 365 | children = ( 366 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 367 | ); 368 | name = Products; 369 | sourceTree = ""; 370 | }; 371 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 372 | isa = PBXGroup; 373 | children = ( 374 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 375 | ); 376 | name = Products; 377 | sourceTree = ""; 378 | }; 379 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 380 | isa = PBXGroup; 381 | children = ( 382 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 383 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, 384 | ); 385 | name = Products; 386 | sourceTree = ""; 387 | }; 388 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 389 | isa = PBXGroup; 390 | children = ( 391 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 392 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, 393 | ); 394 | name = Products; 395 | sourceTree = ""; 396 | }; 397 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 398 | isa = PBXGroup; 399 | children = ( 400 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 401 | ); 402 | name = Products; 403 | sourceTree = ""; 404 | }; 405 | 00E356EF1AD99517003FC87E /* exampleTests */ = { 406 | isa = PBXGroup; 407 | children = ( 408 | 00E356F21AD99517003FC87E /* exampleTests.m */, 409 | 00E356F01AD99517003FC87E /* Supporting Files */, 410 | ); 411 | path = exampleTests; 412 | sourceTree = ""; 413 | }; 414 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 415 | isa = PBXGroup; 416 | children = ( 417 | 00E356F11AD99517003FC87E /* Info.plist */, 418 | ); 419 | name = "Supporting Files"; 420 | sourceTree = ""; 421 | }; 422 | 139105B71AF99BAD00B5F7CC /* Products */ = { 423 | isa = PBXGroup; 424 | children = ( 425 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 426 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, 427 | ); 428 | name = Products; 429 | sourceTree = ""; 430 | }; 431 | 139FDEE71B06529A00C62182 /* Products */ = { 432 | isa = PBXGroup; 433 | children = ( 434 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 435 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 436 | ECBEB2421FC709F800F8DEE9 /* libfishhook.a */, 437 | ECBEB2441FC709F800F8DEE9 /* libfishhook-tvOS.a */, 438 | ); 439 | name = Products; 440 | sourceTree = ""; 441 | }; 442 | 13B07FAE1A68108700A75B9A /* example */ = { 443 | isa = PBXGroup; 444 | children = ( 445 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 446 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 447 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 448 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 449 | 13B07FB61A68108700A75B9A /* Info.plist */, 450 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 451 | 13B07FB71A68108700A75B9A /* main.m */, 452 | ); 453 | name = example; 454 | sourceTree = ""; 455 | }; 456 | 146834001AC3E56700842450 /* Products */ = { 457 | isa = PBXGroup; 458 | children = ( 459 | 146834041AC3E56700842450 /* libReact.a */, 460 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 461 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 462 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 463 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 464 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 465 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, 466 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */, 467 | ); 468 | name = Products; 469 | sourceTree = ""; 470 | }; 471 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = { 472 | isa = PBXGroup; 473 | children = ( 474 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 475 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, 476 | ); 477 | name = Products; 478 | sourceTree = ""; 479 | }; 480 | 78C398B11ACF4ADC00677621 /* Products */ = { 481 | isa = PBXGroup; 482 | children = ( 483 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 484 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, 485 | ); 486 | name = Products; 487 | sourceTree = ""; 488 | }; 489 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 490 | isa = PBXGroup; 491 | children = ( 492 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 493 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 494 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 495 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, 496 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 497 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 498 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 499 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 500 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 501 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 502 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 503 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 504 | 1F9837660811487392D4C675 /* RNSVG.xcodeproj */, 505 | ); 506 | name = Libraries; 507 | sourceTree = ""; 508 | }; 509 | 832341B11AAA6A8300B99B32 /* Products */ = { 510 | isa = PBXGroup; 511 | children = ( 512 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 513 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, 514 | ); 515 | name = Products; 516 | sourceTree = ""; 517 | }; 518 | 83CBB9F61A601CBA00E9B192 = { 519 | isa = PBXGroup; 520 | children = ( 521 | 13B07FAE1A68108700A75B9A /* example */, 522 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 523 | 00E356EF1AD99517003FC87E /* exampleTests */, 524 | 83CBBA001A601CBA00E9B192 /* Products */, 525 | ECBEB2271FC709F600F8DEE9 /* Recovered References */, 526 | ); 527 | indentWidth = 2; 528 | sourceTree = ""; 529 | tabWidth = 2; 530 | usesTabs = 0; 531 | }; 532 | 83CBBA001A601CBA00E9B192 /* Products */ = { 533 | isa = PBXGroup; 534 | children = ( 535 | 13B07F961A680F5B00A75B9A /* example.app */, 536 | 00E356EE1AD99517003FC87E /* exampleTests.xctest */, 537 | 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */, 538 | 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */, 539 | ); 540 | name = Products; 541 | sourceTree = ""; 542 | }; 543 | ADBDB9201DFEBF0600ED6528 /* Products */ = { 544 | isa = PBXGroup; 545 | children = ( 546 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, 547 | ECBEB2301FC709F800F8DEE9 /* libRCTBlob-tvOS.a */, 548 | ); 549 | name = Products; 550 | sourceTree = ""; 551 | }; 552 | ECBEB2271FC709F600F8DEE9 /* Recovered References */ = { 553 | isa = PBXGroup; 554 | children = ( 555 | 1B95FD41B4B6435FAD872264 /* libRNSVG.a */, 556 | 7DFD2AB0A35F4B4DAA6ED47F /* libRNSVG-tvOS.a */, 557 | ); 558 | name = "Recovered References"; 559 | sourceTree = ""; 560 | }; 561 | ECBEB2451FC709F800F8DEE9 /* Products */ = { 562 | isa = PBXGroup; 563 | children = ( 564 | ECBEB24A1FC709F800F8DEE9 /* libRNSVG.a */, 565 | ECBEB24C1FC709F800F8DEE9 /* libRNSVG-tvOS.a */, 566 | ); 567 | name = Products; 568 | sourceTree = ""; 569 | }; 570 | /* End PBXGroup section */ 571 | 572 | /* Begin PBXNativeTarget section */ 573 | 00E356ED1AD99517003FC87E /* exampleTests */ = { 574 | isa = PBXNativeTarget; 575 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */; 576 | buildPhases = ( 577 | 00E356EA1AD99517003FC87E /* Sources */, 578 | 00E356EB1AD99517003FC87E /* Frameworks */, 579 | 00E356EC1AD99517003FC87E /* Resources */, 580 | ); 581 | buildRules = ( 582 | ); 583 | dependencies = ( 584 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 585 | ); 586 | name = exampleTests; 587 | productName = exampleTests; 588 | productReference = 00E356EE1AD99517003FC87E /* exampleTests.xctest */; 589 | productType = "com.apple.product-type.bundle.unit-test"; 590 | }; 591 | 13B07F861A680F5B00A75B9A /* example */ = { 592 | isa = PBXNativeTarget; 593 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; 594 | buildPhases = ( 595 | 13B07F871A680F5B00A75B9A /* Sources */, 596 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 597 | 13B07F8E1A680F5B00A75B9A /* Resources */, 598 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 599 | ); 600 | buildRules = ( 601 | ); 602 | dependencies = ( 603 | ); 604 | name = example; 605 | productName = "Hello World"; 606 | productReference = 13B07F961A680F5B00A75B9A /* example.app */; 607 | productType = "com.apple.product-type.application"; 608 | }; 609 | 2D02E47A1E0B4A5D006451C7 /* example-tvOS */ = { 610 | isa = PBXNativeTarget; 611 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */; 612 | buildPhases = ( 613 | 2D02E4771E0B4A5D006451C7 /* Sources */, 614 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 615 | 2D02E4791E0B4A5D006451C7 /* Resources */, 616 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 617 | ); 618 | buildRules = ( 619 | ); 620 | dependencies = ( 621 | ); 622 | name = "example-tvOS"; 623 | productName = "example-tvOS"; 624 | productReference = 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */; 625 | productType = "com.apple.product-type.application"; 626 | }; 627 | 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */ = { 628 | isa = PBXNativeTarget; 629 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */; 630 | buildPhases = ( 631 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 632 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 633 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 634 | ); 635 | buildRules = ( 636 | ); 637 | dependencies = ( 638 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 639 | ); 640 | name = "example-tvOSTests"; 641 | productName = "example-tvOSTests"; 642 | productReference = 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */; 643 | productType = "com.apple.product-type.bundle.unit-test"; 644 | }; 645 | /* End PBXNativeTarget section */ 646 | 647 | /* Begin PBXProject section */ 648 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 649 | isa = PBXProject; 650 | attributes = { 651 | LastUpgradeCheck = 610; 652 | ORGANIZATIONNAME = Facebook; 653 | TargetAttributes = { 654 | 00E356ED1AD99517003FC87E = { 655 | CreatedOnToolsVersion = 6.2; 656 | TestTargetID = 13B07F861A680F5B00A75B9A; 657 | }; 658 | 2D02E47A1E0B4A5D006451C7 = { 659 | CreatedOnToolsVersion = 8.2.1; 660 | ProvisioningStyle = Automatic; 661 | }; 662 | 2D02E48F1E0B4A5D006451C7 = { 663 | CreatedOnToolsVersion = 8.2.1; 664 | ProvisioningStyle = Automatic; 665 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 666 | }; 667 | }; 668 | }; 669 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; 670 | compatibilityVersion = "Xcode 3.2"; 671 | developmentRegion = English; 672 | hasScannedForEncodings = 0; 673 | knownRegions = ( 674 | en, 675 | Base, 676 | ); 677 | mainGroup = 83CBB9F61A601CBA00E9B192; 678 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 679 | projectDirPath = ""; 680 | projectReferences = ( 681 | { 682 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 683 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 684 | }, 685 | { 686 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; 687 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 688 | }, 689 | { 690 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; 691 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 692 | }, 693 | { 694 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 695 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 696 | }, 697 | { 698 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 699 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 700 | }, 701 | { 702 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 703 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 704 | }, 705 | { 706 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 707 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 708 | }, 709 | { 710 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 711 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 712 | }, 713 | { 714 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 715 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 716 | }, 717 | { 718 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 719 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 720 | }, 721 | { 722 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 723 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 724 | }, 725 | { 726 | ProductGroup = 146834001AC3E56700842450 /* Products */; 727 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 728 | }, 729 | { 730 | ProductGroup = ECBEB2451FC709F800F8DEE9 /* Products */; 731 | ProjectRef = 1F9837660811487392D4C675 /* RNSVG.xcodeproj */; 732 | }, 733 | ); 734 | projectRoot = ""; 735 | targets = ( 736 | 13B07F861A680F5B00A75B9A /* example */, 737 | 00E356ED1AD99517003FC87E /* exampleTests */, 738 | 2D02E47A1E0B4A5D006451C7 /* example-tvOS */, 739 | 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */, 740 | ); 741 | }; 742 | /* End PBXProject section */ 743 | 744 | /* Begin PBXReferenceProxy section */ 745 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 746 | isa = PBXReferenceProxy; 747 | fileType = archive.ar; 748 | path = libRCTActionSheet.a; 749 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 750 | sourceTree = BUILT_PRODUCTS_DIR; 751 | }; 752 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 753 | isa = PBXReferenceProxy; 754 | fileType = archive.ar; 755 | path = libRCTGeolocation.a; 756 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 757 | sourceTree = BUILT_PRODUCTS_DIR; 758 | }; 759 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 760 | isa = PBXReferenceProxy; 761 | fileType = archive.ar; 762 | path = libRCTImage.a; 763 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 764 | sourceTree = BUILT_PRODUCTS_DIR; 765 | }; 766 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 767 | isa = PBXReferenceProxy; 768 | fileType = archive.ar; 769 | path = libRCTNetwork.a; 770 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 771 | sourceTree = BUILT_PRODUCTS_DIR; 772 | }; 773 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 774 | isa = PBXReferenceProxy; 775 | fileType = archive.ar; 776 | path = libRCTVibration.a; 777 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 778 | sourceTree = BUILT_PRODUCTS_DIR; 779 | }; 780 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 781 | isa = PBXReferenceProxy; 782 | fileType = archive.ar; 783 | path = libRCTSettings.a; 784 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 785 | sourceTree = BUILT_PRODUCTS_DIR; 786 | }; 787 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 788 | isa = PBXReferenceProxy; 789 | fileType = archive.ar; 790 | path = libRCTWebSocket.a; 791 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 792 | sourceTree = BUILT_PRODUCTS_DIR; 793 | }; 794 | 146834041AC3E56700842450 /* libReact.a */ = { 795 | isa = PBXReferenceProxy; 796 | fileType = archive.ar; 797 | path = libReact.a; 798 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 799 | sourceTree = BUILT_PRODUCTS_DIR; 800 | }; 801 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { 802 | isa = PBXReferenceProxy; 803 | fileType = archive.ar; 804 | path = "libRCTImage-tvOS.a"; 805 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; 806 | sourceTree = BUILT_PRODUCTS_DIR; 807 | }; 808 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { 809 | isa = PBXReferenceProxy; 810 | fileType = archive.ar; 811 | path = "libRCTLinking-tvOS.a"; 812 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; 813 | sourceTree = BUILT_PRODUCTS_DIR; 814 | }; 815 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { 816 | isa = PBXReferenceProxy; 817 | fileType = archive.ar; 818 | path = "libRCTNetwork-tvOS.a"; 819 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; 820 | sourceTree = BUILT_PRODUCTS_DIR; 821 | }; 822 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { 823 | isa = PBXReferenceProxy; 824 | fileType = archive.ar; 825 | path = "libRCTSettings-tvOS.a"; 826 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; 827 | sourceTree = BUILT_PRODUCTS_DIR; 828 | }; 829 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { 830 | isa = PBXReferenceProxy; 831 | fileType = archive.ar; 832 | path = "libRCTText-tvOS.a"; 833 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; 834 | sourceTree = BUILT_PRODUCTS_DIR; 835 | }; 836 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { 837 | isa = PBXReferenceProxy; 838 | fileType = archive.ar; 839 | path = "libRCTWebSocket-tvOS.a"; 840 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; 841 | sourceTree = BUILT_PRODUCTS_DIR; 842 | }; 843 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = { 844 | isa = PBXReferenceProxy; 845 | fileType = archive.ar; 846 | path = "libReact-tvOS.a"; 847 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; 848 | sourceTree = BUILT_PRODUCTS_DIR; 849 | }; 850 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { 851 | isa = PBXReferenceProxy; 852 | fileType = archive.ar; 853 | path = libyoga.a; 854 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; 855 | sourceTree = BUILT_PRODUCTS_DIR; 856 | }; 857 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { 858 | isa = PBXReferenceProxy; 859 | fileType = archive.ar; 860 | path = libyoga.a; 861 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; 862 | sourceTree = BUILT_PRODUCTS_DIR; 863 | }; 864 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { 865 | isa = PBXReferenceProxy; 866 | fileType = archive.ar; 867 | path = libcxxreact.a; 868 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; 869 | sourceTree = BUILT_PRODUCTS_DIR; 870 | }; 871 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { 872 | isa = PBXReferenceProxy; 873 | fileType = archive.ar; 874 | path = libcxxreact.a; 875 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; 876 | sourceTree = BUILT_PRODUCTS_DIR; 877 | }; 878 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { 879 | isa = PBXReferenceProxy; 880 | fileType = archive.ar; 881 | path = libjschelpers.a; 882 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; 883 | sourceTree = BUILT_PRODUCTS_DIR; 884 | }; 885 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { 886 | isa = PBXReferenceProxy; 887 | fileType = archive.ar; 888 | path = libjschelpers.a; 889 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; 890 | sourceTree = BUILT_PRODUCTS_DIR; 891 | }; 892 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 893 | isa = PBXReferenceProxy; 894 | fileType = archive.ar; 895 | path = libRCTAnimation.a; 896 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 897 | sourceTree = BUILT_PRODUCTS_DIR; 898 | }; 899 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 900 | isa = PBXReferenceProxy; 901 | fileType = archive.ar; 902 | path = libRCTAnimation.a; 903 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 904 | sourceTree = BUILT_PRODUCTS_DIR; 905 | }; 906 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 907 | isa = PBXReferenceProxy; 908 | fileType = archive.ar; 909 | path = libRCTLinking.a; 910 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 911 | sourceTree = BUILT_PRODUCTS_DIR; 912 | }; 913 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 914 | isa = PBXReferenceProxy; 915 | fileType = archive.ar; 916 | path = libRCTText.a; 917 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 918 | sourceTree = BUILT_PRODUCTS_DIR; 919 | }; 920 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { 921 | isa = PBXReferenceProxy; 922 | fileType = archive.ar; 923 | path = libRCTBlob.a; 924 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; 925 | sourceTree = BUILT_PRODUCTS_DIR; 926 | }; 927 | ECBEB2301FC709F800F8DEE9 /* libRCTBlob-tvOS.a */ = { 928 | isa = PBXReferenceProxy; 929 | fileType = archive.ar; 930 | path = "libRCTBlob-tvOS.a"; 931 | remoteRef = ECBEB22F1FC709F800F8DEE9 /* PBXContainerItemProxy */; 932 | sourceTree = BUILT_PRODUCTS_DIR; 933 | }; 934 | ECBEB2421FC709F800F8DEE9 /* libfishhook.a */ = { 935 | isa = PBXReferenceProxy; 936 | fileType = archive.ar; 937 | path = libfishhook.a; 938 | remoteRef = ECBEB2411FC709F800F8DEE9 /* PBXContainerItemProxy */; 939 | sourceTree = BUILT_PRODUCTS_DIR; 940 | }; 941 | ECBEB2441FC709F800F8DEE9 /* libfishhook-tvOS.a */ = { 942 | isa = PBXReferenceProxy; 943 | fileType = archive.ar; 944 | path = "libfishhook-tvOS.a"; 945 | remoteRef = ECBEB2431FC709F800F8DEE9 /* PBXContainerItemProxy */; 946 | sourceTree = BUILT_PRODUCTS_DIR; 947 | }; 948 | ECBEB24A1FC709F800F8DEE9 /* libRNSVG.a */ = { 949 | isa = PBXReferenceProxy; 950 | fileType = archive.ar; 951 | path = libRNSVG.a; 952 | remoteRef = ECBEB2491FC709F800F8DEE9 /* PBXContainerItemProxy */; 953 | sourceTree = BUILT_PRODUCTS_DIR; 954 | }; 955 | ECBEB24C1FC709F800F8DEE9 /* libRNSVG-tvOS.a */ = { 956 | isa = PBXReferenceProxy; 957 | fileType = archive.ar; 958 | path = "libRNSVG-tvOS.a"; 959 | remoteRef = ECBEB24B1FC709F800F8DEE9 /* PBXContainerItemProxy */; 960 | sourceTree = BUILT_PRODUCTS_DIR; 961 | }; 962 | /* End PBXReferenceProxy section */ 963 | 964 | /* Begin PBXResourcesBuildPhase section */ 965 | 00E356EC1AD99517003FC87E /* Resources */ = { 966 | isa = PBXResourcesBuildPhase; 967 | buildActionMask = 2147483647; 968 | files = ( 969 | ); 970 | runOnlyForDeploymentPostprocessing = 0; 971 | }; 972 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 973 | isa = PBXResourcesBuildPhase; 974 | buildActionMask = 2147483647; 975 | files = ( 976 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 977 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 978 | ); 979 | runOnlyForDeploymentPostprocessing = 0; 980 | }; 981 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 982 | isa = PBXResourcesBuildPhase; 983 | buildActionMask = 2147483647; 984 | files = ( 985 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 986 | ); 987 | runOnlyForDeploymentPostprocessing = 0; 988 | }; 989 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 990 | isa = PBXResourcesBuildPhase; 991 | buildActionMask = 2147483647; 992 | files = ( 993 | ); 994 | runOnlyForDeploymentPostprocessing = 0; 995 | }; 996 | /* End PBXResourcesBuildPhase section */ 997 | 998 | /* Begin PBXShellScriptBuildPhase section */ 999 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 1000 | isa = PBXShellScriptBuildPhase; 1001 | buildActionMask = 2147483647; 1002 | files = ( 1003 | ); 1004 | inputPaths = ( 1005 | ); 1006 | name = "Bundle React Native code and images"; 1007 | outputPaths = ( 1008 | ); 1009 | runOnlyForDeploymentPostprocessing = 0; 1010 | shellPath = /bin/sh; 1011 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 1012 | }; 1013 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 1014 | isa = PBXShellScriptBuildPhase; 1015 | buildActionMask = 2147483647; 1016 | files = ( 1017 | ); 1018 | inputPaths = ( 1019 | ); 1020 | name = "Bundle React Native Code And Images"; 1021 | outputPaths = ( 1022 | ); 1023 | runOnlyForDeploymentPostprocessing = 0; 1024 | shellPath = /bin/sh; 1025 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 1026 | }; 1027 | /* End PBXShellScriptBuildPhase section */ 1028 | 1029 | /* Begin PBXSourcesBuildPhase section */ 1030 | 00E356EA1AD99517003FC87E /* Sources */ = { 1031 | isa = PBXSourcesBuildPhase; 1032 | buildActionMask = 2147483647; 1033 | files = ( 1034 | 00E356F31AD99517003FC87E /* exampleTests.m in Sources */, 1035 | ); 1036 | runOnlyForDeploymentPostprocessing = 0; 1037 | }; 1038 | 13B07F871A680F5B00A75B9A /* Sources */ = { 1039 | isa = PBXSourcesBuildPhase; 1040 | buildActionMask = 2147483647; 1041 | files = ( 1042 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 1043 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 1044 | ); 1045 | runOnlyForDeploymentPostprocessing = 0; 1046 | }; 1047 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 1048 | isa = PBXSourcesBuildPhase; 1049 | buildActionMask = 2147483647; 1050 | files = ( 1051 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 1052 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 1053 | ); 1054 | runOnlyForDeploymentPostprocessing = 0; 1055 | }; 1056 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 1057 | isa = PBXSourcesBuildPhase; 1058 | buildActionMask = 2147483647; 1059 | files = ( 1060 | 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */, 1061 | ); 1062 | runOnlyForDeploymentPostprocessing = 0; 1063 | }; 1064 | /* End PBXSourcesBuildPhase section */ 1065 | 1066 | /* Begin PBXTargetDependency section */ 1067 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 1068 | isa = PBXTargetDependency; 1069 | target = 13B07F861A680F5B00A75B9A /* example */; 1070 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 1071 | }; 1072 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 1073 | isa = PBXTargetDependency; 1074 | target = 2D02E47A1E0B4A5D006451C7 /* example-tvOS */; 1075 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 1076 | }; 1077 | /* End PBXTargetDependency section */ 1078 | 1079 | /* Begin PBXVariantGroup section */ 1080 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 1081 | isa = PBXVariantGroup; 1082 | children = ( 1083 | 13B07FB21A68108700A75B9A /* Base */, 1084 | ); 1085 | name = LaunchScreen.xib; 1086 | path = example; 1087 | sourceTree = ""; 1088 | }; 1089 | /* End PBXVariantGroup section */ 1090 | 1091 | /* Begin XCBuildConfiguration section */ 1092 | 00E356F61AD99517003FC87E /* Debug */ = { 1093 | isa = XCBuildConfiguration; 1094 | buildSettings = { 1095 | BUNDLE_LOADER = "$(TEST_HOST)"; 1096 | GCC_PREPROCESSOR_DEFINITIONS = ( 1097 | "DEBUG=1", 1098 | "$(inherited)", 1099 | ); 1100 | HEADER_SEARCH_PATHS = ( 1101 | "$(inherited)", 1102 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**", 1103 | ); 1104 | INFOPLIST_FILE = exampleTests/Info.plist; 1105 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1106 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1107 | LIBRARY_SEARCH_PATHS = ( 1108 | "$(inherited)", 1109 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1110 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1111 | ); 1112 | OTHER_LDFLAGS = ( 1113 | "-ObjC", 1114 | "-lc++", 1115 | ); 1116 | PRODUCT_NAME = "$(TARGET_NAME)"; 1117 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; 1118 | }; 1119 | name = Debug; 1120 | }; 1121 | 00E356F71AD99517003FC87E /* Release */ = { 1122 | isa = XCBuildConfiguration; 1123 | buildSettings = { 1124 | BUNDLE_LOADER = "$(TEST_HOST)"; 1125 | COPY_PHASE_STRIP = NO; 1126 | HEADER_SEARCH_PATHS = ( 1127 | "$(inherited)", 1128 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**", 1129 | ); 1130 | INFOPLIST_FILE = exampleTests/Info.plist; 1131 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1132 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1133 | LIBRARY_SEARCH_PATHS = ( 1134 | "$(inherited)", 1135 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1136 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1137 | ); 1138 | OTHER_LDFLAGS = ( 1139 | "-ObjC", 1140 | "-lc++", 1141 | ); 1142 | PRODUCT_NAME = "$(TARGET_NAME)"; 1143 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; 1144 | }; 1145 | name = Release; 1146 | }; 1147 | 13B07F941A680F5B00A75B9A /* Debug */ = { 1148 | isa = XCBuildConfiguration; 1149 | buildSettings = { 1150 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1151 | CURRENT_PROJECT_VERSION = 1; 1152 | DEAD_CODE_STRIPPING = NO; 1153 | HEADER_SEARCH_PATHS = ( 1154 | "$(inherited)", 1155 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**", 1156 | ); 1157 | INFOPLIST_FILE = example/Info.plist; 1158 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1159 | OTHER_LDFLAGS = ( 1160 | "$(inherited)", 1161 | "-ObjC", 1162 | "-lc++", 1163 | ); 1164 | PRODUCT_NAME = example; 1165 | VERSIONING_SYSTEM = "apple-generic"; 1166 | }; 1167 | name = Debug; 1168 | }; 1169 | 13B07F951A680F5B00A75B9A /* Release */ = { 1170 | isa = XCBuildConfiguration; 1171 | buildSettings = { 1172 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1173 | CURRENT_PROJECT_VERSION = 1; 1174 | HEADER_SEARCH_PATHS = ( 1175 | "$(inherited)", 1176 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**", 1177 | ); 1178 | INFOPLIST_FILE = example/Info.plist; 1179 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1180 | OTHER_LDFLAGS = ( 1181 | "$(inherited)", 1182 | "-ObjC", 1183 | "-lc++", 1184 | ); 1185 | PRODUCT_NAME = example; 1186 | VERSIONING_SYSTEM = "apple-generic"; 1187 | }; 1188 | name = Release; 1189 | }; 1190 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 1191 | isa = XCBuildConfiguration; 1192 | buildSettings = { 1193 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1194 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1195 | CLANG_ANALYZER_NONNULL = YES; 1196 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1197 | CLANG_WARN_INFINITE_RECURSION = YES; 1198 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1199 | DEBUG_INFORMATION_FORMAT = dwarf; 1200 | ENABLE_TESTABILITY = YES; 1201 | GCC_NO_COMMON_BLOCKS = YES; 1202 | HEADER_SEARCH_PATHS = ( 1203 | "$(inherited)", 1204 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**", 1205 | ); 1206 | INFOPLIST_FILE = "example-tvOS/Info.plist"; 1207 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1208 | LIBRARY_SEARCH_PATHS = ( 1209 | "$(inherited)", 1210 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1211 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1212 | ); 1213 | OTHER_LDFLAGS = ( 1214 | "-ObjC", 1215 | "-lc++", 1216 | ); 1217 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; 1218 | PRODUCT_NAME = "$(TARGET_NAME)"; 1219 | SDKROOT = appletvos; 1220 | TARGETED_DEVICE_FAMILY = 3; 1221 | TVOS_DEPLOYMENT_TARGET = 9.2; 1222 | }; 1223 | name = Debug; 1224 | }; 1225 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 1226 | isa = XCBuildConfiguration; 1227 | buildSettings = { 1228 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1229 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1230 | CLANG_ANALYZER_NONNULL = YES; 1231 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1232 | CLANG_WARN_INFINITE_RECURSION = YES; 1233 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1234 | COPY_PHASE_STRIP = NO; 1235 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1236 | GCC_NO_COMMON_BLOCKS = YES; 1237 | HEADER_SEARCH_PATHS = ( 1238 | "$(inherited)", 1239 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**", 1240 | ); 1241 | INFOPLIST_FILE = "example-tvOS/Info.plist"; 1242 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1243 | LIBRARY_SEARCH_PATHS = ( 1244 | "$(inherited)", 1245 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1246 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1247 | ); 1248 | OTHER_LDFLAGS = ( 1249 | "-ObjC", 1250 | "-lc++", 1251 | ); 1252 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; 1253 | PRODUCT_NAME = "$(TARGET_NAME)"; 1254 | SDKROOT = appletvos; 1255 | TARGETED_DEVICE_FAMILY = 3; 1256 | TVOS_DEPLOYMENT_TARGET = 9.2; 1257 | }; 1258 | name = Release; 1259 | }; 1260 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 1261 | isa = XCBuildConfiguration; 1262 | buildSettings = { 1263 | BUNDLE_LOADER = "$(TEST_HOST)"; 1264 | CLANG_ANALYZER_NONNULL = YES; 1265 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1266 | CLANG_WARN_INFINITE_RECURSION = YES; 1267 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1268 | DEBUG_INFORMATION_FORMAT = dwarf; 1269 | ENABLE_TESTABILITY = YES; 1270 | GCC_NO_COMMON_BLOCKS = YES; 1271 | INFOPLIST_FILE = "example-tvOSTests/Info.plist"; 1272 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1273 | LIBRARY_SEARCH_PATHS = ( 1274 | "$(inherited)", 1275 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1276 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1277 | ); 1278 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; 1279 | PRODUCT_NAME = "$(TARGET_NAME)"; 1280 | SDKROOT = appletvos; 1281 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; 1282 | TVOS_DEPLOYMENT_TARGET = 10.1; 1283 | }; 1284 | name = Debug; 1285 | }; 1286 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 1287 | isa = XCBuildConfiguration; 1288 | buildSettings = { 1289 | BUNDLE_LOADER = "$(TEST_HOST)"; 1290 | CLANG_ANALYZER_NONNULL = YES; 1291 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1292 | CLANG_WARN_INFINITE_RECURSION = YES; 1293 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1294 | COPY_PHASE_STRIP = NO; 1295 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1296 | GCC_NO_COMMON_BLOCKS = YES; 1297 | INFOPLIST_FILE = "example-tvOSTests/Info.plist"; 1298 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1299 | LIBRARY_SEARCH_PATHS = ( 1300 | "$(inherited)", 1301 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1302 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1303 | ); 1304 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; 1305 | PRODUCT_NAME = "$(TARGET_NAME)"; 1306 | SDKROOT = appletvos; 1307 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; 1308 | TVOS_DEPLOYMENT_TARGET = 10.1; 1309 | }; 1310 | name = Release; 1311 | }; 1312 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 1313 | isa = XCBuildConfiguration; 1314 | buildSettings = { 1315 | ALWAYS_SEARCH_USER_PATHS = NO; 1316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1317 | CLANG_CXX_LIBRARY = "libc++"; 1318 | CLANG_ENABLE_MODULES = YES; 1319 | CLANG_ENABLE_OBJC_ARC = YES; 1320 | CLANG_WARN_BOOL_CONVERSION = YES; 1321 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1322 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1323 | CLANG_WARN_EMPTY_BODY = YES; 1324 | CLANG_WARN_ENUM_CONVERSION = YES; 1325 | CLANG_WARN_INT_CONVERSION = YES; 1326 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1327 | CLANG_WARN_UNREACHABLE_CODE = YES; 1328 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1329 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1330 | COPY_PHASE_STRIP = NO; 1331 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1332 | GCC_C_LANGUAGE_STANDARD = gnu99; 1333 | GCC_DYNAMIC_NO_PIC = NO; 1334 | GCC_OPTIMIZATION_LEVEL = 0; 1335 | GCC_PREPROCESSOR_DEFINITIONS = ( 1336 | "DEBUG=1", 1337 | "$(inherited)", 1338 | ); 1339 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 1340 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1341 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1342 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1343 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1344 | GCC_WARN_UNUSED_FUNCTION = YES; 1345 | GCC_WARN_UNUSED_VARIABLE = YES; 1346 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1347 | MTL_ENABLE_DEBUG_INFO = YES; 1348 | ONLY_ACTIVE_ARCH = YES; 1349 | SDKROOT = iphoneos; 1350 | }; 1351 | name = Debug; 1352 | }; 1353 | 83CBBA211A601CBA00E9B192 /* Release */ = { 1354 | isa = XCBuildConfiguration; 1355 | buildSettings = { 1356 | ALWAYS_SEARCH_USER_PATHS = NO; 1357 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1358 | CLANG_CXX_LIBRARY = "libc++"; 1359 | CLANG_ENABLE_MODULES = YES; 1360 | CLANG_ENABLE_OBJC_ARC = YES; 1361 | CLANG_WARN_BOOL_CONVERSION = YES; 1362 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1363 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1364 | CLANG_WARN_EMPTY_BODY = YES; 1365 | CLANG_WARN_ENUM_CONVERSION = YES; 1366 | CLANG_WARN_INT_CONVERSION = YES; 1367 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1368 | CLANG_WARN_UNREACHABLE_CODE = YES; 1369 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1370 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1371 | COPY_PHASE_STRIP = YES; 1372 | ENABLE_NS_ASSERTIONS = NO; 1373 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1374 | GCC_C_LANGUAGE_STANDARD = gnu99; 1375 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1376 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1377 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1378 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1379 | GCC_WARN_UNUSED_FUNCTION = YES; 1380 | GCC_WARN_UNUSED_VARIABLE = YES; 1381 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1382 | MTL_ENABLE_DEBUG_INFO = NO; 1383 | SDKROOT = iphoneos; 1384 | VALIDATE_PRODUCT = YES; 1385 | }; 1386 | name = Release; 1387 | }; 1388 | /* End XCBuildConfiguration section */ 1389 | 1390 | /* Begin XCConfigurationList section */ 1391 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */ = { 1392 | isa = XCConfigurationList; 1393 | buildConfigurations = ( 1394 | 00E356F61AD99517003FC87E /* Debug */, 1395 | 00E356F71AD99517003FC87E /* Release */, 1396 | ); 1397 | defaultConfigurationIsVisible = 0; 1398 | defaultConfigurationName = Release; 1399 | }; 1400 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { 1401 | isa = XCConfigurationList; 1402 | buildConfigurations = ( 1403 | 13B07F941A680F5B00A75B9A /* Debug */, 1404 | 13B07F951A680F5B00A75B9A /* Release */, 1405 | ); 1406 | defaultConfigurationIsVisible = 0; 1407 | defaultConfigurationName = Release; 1408 | }; 1409 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */ = { 1410 | isa = XCConfigurationList; 1411 | buildConfigurations = ( 1412 | 2D02E4971E0B4A5E006451C7 /* Debug */, 1413 | 2D02E4981E0B4A5E006451C7 /* Release */, 1414 | ); 1415 | defaultConfigurationIsVisible = 0; 1416 | defaultConfigurationName = Release; 1417 | }; 1418 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */ = { 1419 | isa = XCConfigurationList; 1420 | buildConfigurations = ( 1421 | 2D02E4991E0B4A5E006451C7 /* Debug */, 1422 | 2D02E49A1E0B4A5E006451C7 /* Release */, 1423 | ); 1424 | defaultConfigurationIsVisible = 0; 1425 | defaultConfigurationName = Release; 1426 | }; 1427 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { 1428 | isa = XCConfigurationList; 1429 | buildConfigurations = ( 1430 | 83CBBA201A601CBA00E9B192 /* Debug */, 1431 | 83CBBA211A601CBA00E9B192 /* Release */, 1432 | ); 1433 | defaultConfigurationIsVisible = 0; 1434 | defaultConfigurationName = Release; 1435 | }; 1436 | /* End XCConfigurationList section */ 1437 | }; 1438 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1439 | } 1440 | --------------------------------------------------------------------------------