diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..1b1140f --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,30 @@ + + +- [ ] I have searched [existing issues](https://github.com/ptomasroos/react-native-multi-slider/issues) +- [ ] I am using the [latest multi slider version](https://www.npmjs.com/package/@ptomasroos/react-native-multi-slider) + + + +## Steps to Reproduce + + +## Expected Behavior + + +## Actual Behavior + diff --git a/.gitignore b/.gitignore index b927355..b6b3ea8 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ project.xcworkspace # node_modules/ npm-debug.log +.idea/ +*.lock diff --git a/.npmignore b/.npmignore index 8080dcf..db0a126 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,4 @@ docs/ -example/ +examples/ +.idea/ +node_modules/ diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..0310300 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,5 @@ +module.exports = { + bracketSpacing: true, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/CHANGELOG b/CHANGELOG index 021859c..0aaf6d8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,30 @@ +# 1.0.0 +- Vertically centered slider + +# 0.0.14 + - RTL support + +# 0.0.13 + - Pass currentValue to Markers + - Missing var statement + - Allow different types of left and right markers in a single slider + - Improvements on marker alignment on large gaps + +# 0.0.12 + +Various updates: + +- modernize converters code +- valueToPosition uses closest index function +- improve cWRP to handle min, max properly changes +- fix wierd bug on multiple values +- fixed valueToPosition again +- ignore termination request + +# 0.0.11 + +Updated ViewProps to support older versions + # 0.0.10 BREAKING: Updated PropTypes imports for React 16 diff --git a/DefaultLabel.js b/DefaultLabel.js new file mode 100644 index 0000000..a0db23c --- /dev/null +++ b/DefaultLabel.js @@ -0,0 +1,80 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import { View, Text, StyleSheet } from 'react-native'; + +const sliderRadius = 3; +const width = 50; +export default class DefaultLabel extends React.Component { + static propTypes = { + oneMarkerValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + twoMarkerValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + + oneMarkerLeftPosition: PropTypes.number, + twoMarkerLeftPosition: PropTypes.number, + + oneMarkerPressed: PropTypes.bool, + twoMarkerPressed: PropTypes.bool, + }; + + render() { + const { + oneMarkerValue, + twoMarkerValue, + oneMarkerLeftPosition, + twoMarkerLeftPosition, + oneMarkerPressed, + twoMarkerPressed, + } = this.props; + + return ( + + {Number.isFinite(oneMarkerLeftPosition) && + Number.isFinite(oneMarkerValue) && ( + + {oneMarkerValue} + + )} + + {Number.isFinite(twoMarkerLeftPosition) && + Number.isFinite(twoMarkerValue) && ( + + {twoMarkerValue} + + )} + + ); + } +} + +const styles = StyleSheet.create({ + sliderLabel: { + position: 'absolute', + bottom: 0, + minWidth: width, + padding: 8, + backgroundColor: '#f1f1f1', + }, + sliderLabelText: { + alignItems: 'center', + textAlign: 'center', + fontStyle: 'normal', + fontSize: 11, + }, + markerPressed: { + borderWidth: 2, + borderColor: '#999', + }, +}); diff --git a/DefaultMarker.js b/DefaultMarker.js index fb055b7..aeb46ff 100644 --- a/DefaultMarker.js +++ b/DefaultMarker.js @@ -1,30 +1,25 @@ import React from 'react'; -import PropTypes from 'prop-types'; - import { View, StyleSheet, Platform, TouchableHighlight } from 'react-native'; -const ViewPropTypes = require('react-native').ViewPropTypes || View.propTypes; - -export default class DefaultMarker extends React.Component { - static propTypes = { - pressed: PropTypes.bool, - pressedMarkerStyle: ViewPropTypes.style, - markerStyle: ViewPropTypes.style, - enabled: PropTypes.bool, - valuePrefix: PropTypes.string, - valueSuffix: PropTypes.string, - }; - +class DefaultMarker extends React.Component { render() { return ( ); @@ -55,10 +50,26 @@ const styles = StyleSheet.create({ borderRadius: 12, backgroundColor: '#0D8675', }, + web: { + height: 30, + width: 30, + borderRadius: 30, + borderWidth: 1, + borderColor: '#DDDDDD', + backgroundColor: '#FFFFFF', + shadowColor: '#000000', + shadowOffset: { + width: 0, + height: 3, + }, + shadowRadius: 1, + shadowOpacity: 0.2, + }, }), }, pressedMarkerStyle: { ...Platform.select({ + web: {}, ios: {}, android: { height: 20, @@ -71,3 +82,5 @@ const styles = StyleSheet.create({ backgroundColor: '#d3d3d3', }, }); + +export default DefaultMarker; diff --git a/LICENSE b/LICENSE index e208198..4f8c5b4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ The MIT License (MIT) -Copyright (c) Tomas Roos 2016. +Copyright (c) jrans 2015-2016. +Copyright (c) Tomas Roos. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MultiSlider.js b/MultiSlider.js old mode 100644 new mode 100755 index f6206fa..a3f28b5 --- a/MultiSlider.js +++ b/MultiSlider.js @@ -1,65 +1,27 @@ import React from 'react'; -import PropTypes from 'prop-types'; +import { Text } from 'react-native'; import { StyleSheet, PanResponder, View, - TouchableHighlight, Platform, + Dimensions, + I18nManager, + ImageBackground, } from 'react-native'; import DefaultMarker from './DefaultMarker'; +import DefaultLabel from './DefaultLabel'; import { createArray, valueToPosition, positionToValue } from './converters'; -const ViewPropTypes = require('react-native').ViewPropTypes || View.propTypes; - export default class MultiSlider extends React.Component { - static propTypes = { - values: PropTypes.arrayOf(PropTypes.number), - - onValuesChangeStart: PropTypes.func, - onValuesChange: PropTypes.func, - onValuesChangeFinish: PropTypes.func, - - sliderLength: PropTypes.number, - touchDimensions: PropTypes.object, - - customMarker: PropTypes.func, - - min: PropTypes.number, - max: PropTypes.number, - step: PropTypes.number, - - optionsArray: PropTypes.array, - - containerStyle: ViewPropTypes.style, - trackStyle: ViewPropTypes.style, - selectedStyle: ViewPropTypes.style, - unselectedStyle: ViewPropTypes.style, - markerContainerStyle: ViewPropTypes.style, - markerStyle: ViewPropTypes.style, - pressedMarkerStyle: ViewPropTypes.style, - valuePrefix: PropTypes.string, - valueSuffix: PropTypes.string, - enabledOne: PropTypes.bool, - enabledTwo: PropTypes.bool, - onToggleOne: PropTypes.func, - onToggleTwo: PropTypes.func, - allowOverlap: PropTypes.bool, - snapped: PropTypes.bool, - markerOffsetX: PropTypes.number, - markerOffsetY: PropTypes.number, - }; - static defaultProps = { values: [0], - onValuesChangeStart: () => { - }, - onValuesChange: values => { - }, - onValuesChangeFinish: values => { - }, + onValuesChangeStart: () => {}, + onValuesChange: values => {}, + onValuesChangeFinish: values => {}, + onMarkersPosition: values => {}, step: 1, min: 0, max: 10, @@ -70,26 +32,80 @@ export default class MultiSlider extends React.Component { slipDisplacement: 200, }, customMarker: DefaultMarker, + customMarkerLeft: DefaultMarker, + customMarkerRight: DefaultMarker, + customLabel: DefaultLabel, markerOffsetX: 0, markerOffsetY: 0, + markerSize: 0, sliderLength: 280, onToggleOne: undefined, onToggleTwo: undefined, + stepsAs: [], + showSteps: false, + showStepMarkers: true, + showStepLabels: true, enabledOne: true, enabledTwo: true, allowOverlap: false, snapped: false, + smoothSnapped: false, + vertical: false, + minMarkerOverlapDistance: 0, + minMarkerOverlapStepDistance: 0, + testID: '', }; constructor(props) { super(props); - this.optionsArray = this.props.optionsArray || + if ( + this.props.minMarkerOverlapDistance > 0 && + this.props.minMarkerOverlapStepDistance > 0 + ) { + console.error( + 'You should provide either "minMarkerOverlapDistance" or "minMarkerOverlapStepDistance", not both. Expect unreliable results.', + ); + } + + this.optionsArray = + this.props.optionsArray || createArray(this.props.min, this.props.max, this.props.step); - this.stepLength = this.props.sliderLength / this.optionsArray.length; + this.stepLength = this.props.sliderLength / (this.optionsArray.length - 1); var initialValues = this.props.values.map(value => - valueToPosition(value, this.optionsArray, this.props.sliderLength)); + valueToPosition( + value, + this.optionsArray, + this.props.sliderLength, + this.props.markerSize, + ), + ); + + var tempStepsAs = {}; + this.props.stepsAs.forEach(step => { + if (step?.index !== undefined) { + tempStepsAs[step?.index] = step; + } + }); + + this.stepsAs = {}; + this.optionsArray.forEach((ops, index) => { + if (tempStepsAs[index]) { + var step = tempStepsAs[index]; + this.stepsAs[index] = { + stepLabel: step?.stepLabel ? step.stepLabel : ops, + suffix: step?.suffix ? step.suffix : '', + prefix: step?.prefix ? step.prefix : '', + }; + } else { + this.stepsAs[index] = { + stepLabel: ops, + suffix: '', + prefix: '', + }; + } + }); this.state = { pressedOne: true, @@ -100,9 +116,11 @@ export default class MultiSlider extends React.Component { positionOne: initialValues[0], positionTwo: initialValues[1], }; + + this.subscribePanResponder(); } - componentWillMount() { + subscribePanResponder = () => { var customPanResponder = (start, move, end) => { return PanResponder.create({ onStartShouldSetPanResponder: (evt, gestureState) => true, @@ -111,13 +129,28 @@ export default class MultiSlider extends React.Component { onMoveShouldSetPanResponderCapture: (evt, gestureState) => true, onPanResponderGrant: (evt, gestureState) => start(), onPanResponderMove: (evt, gestureState) => move(gestureState), - onPanResponderTerminationRequest: (evt, gestureState) => true, + onPanResponderTerminationRequest: (evt, gestureState) => false, onPanResponderRelease: (evt, gestureState) => end(gestureState), onPanResponderTerminate: (evt, gestureState) => end(gestureState), onShouldBlockNativeResponder: (evt, gestureState) => true, }); }; + this._panResponderBetween = customPanResponder( + gestureState => { + this.startOne(gestureState); + this.startTwo(gestureState); + }, + gestureState => { + this.moveOne(gestureState); + this.moveTwo(gestureState); + }, + gestureState => { + this.endOne(gestureState); + this.endTwo(gestureState); + }, + ); + this._panResponderOne = customPanResponder( this.startOne, this.moveOne, @@ -128,49 +161,13 @@ export default class MultiSlider extends React.Component { this.moveTwo, this.endTwo, ); - } - - componentWillReceiveProps(nextProps) { - if (this.state.onePressed || this.state.twoPressed) { - return; - } - - let position, nextState = {}; - if ( - nextProps.values[0] !== this.state.valueOne || - nextProps.sliderLength !== this.props.sliderLength - ) { - position = valueToPosition( - nextProps.values[0], - this.optionsArray, - nextProps.sliderLength, - ); - nextState.valueOne = nextProps.values[0]; - nextState.pastOne = position; - nextState.positionOne = position; - } - if ( - nextProps.values[1] !== this.state.valueTwo || - (nextProps.sliderLength !== this.props.sliderLength && - nextProps.values[1]) - ) { - position = valueToPosition( - nextProps.values[1], - this.optionsArray, - nextProps.sliderLength, - ); - nextState.valueTwo = nextProps.values[1]; - nextState.pastTwo = position; - nextState.positionTwo = position; - } - - if (nextState != {}) { - this.setState(nextState); - } - } + }; startOne = () => { if (this.props.enabledOne) { + if (this.props.onMarkerOneMoveStart) { + this.props.onMarkerOneMoveStart(this._markerOne); + } this.props.onValuesChangeStart(); this.setState({ onePressed: !this.state.onePressed, @@ -180,6 +177,9 @@ export default class MultiSlider extends React.Component { startTwo = () => { if (this.props.enabledTwo) { + if (this.props.onMarkerTwoMoveStart) { + this.props.onMarkerTwoMoveStart(this._markerTwo); + } this.props.onValuesChangeStart(); this.setState({ twoPressed: !this.state.twoPressed, @@ -192,26 +192,52 @@ export default class MultiSlider extends React.Component { return; } - var unconfined = gestureState.dx + this.state.pastOne; - var bottom = 0; - var trueTop = this.state.positionTwo - (this.props.allowOverlap ? 0 : this.stepLength); - var top = trueTop === 0 ? 0 : trueTop || this.props.sliderLength; - var confined = unconfined < bottom - ? bottom - : unconfined > top ? top : unconfined; + const accumDistance = this.props.vertical + ? -gestureState.dy + : gestureState.dx; + const accumDistanceDisplacement = this.props.vertical + ? gestureState.dx + : gestureState.dy; + + const unconfined = I18nManager.isRTL + ? this.state.pastOne - accumDistance + : accumDistance + this.state.pastOne; + var bottom = this.props.markerSize / 2; + var trueTop = + this.state.positionTwo - + (this.props.allowOverlap + ? 0 + : this.props.minMarkerOverlapDistance > 0 + ? this.props.minMarkerOverlapDistance + : (this.props.minMarkerOverlapStepDistance || 1) * this.stepLength); + var top = + trueTop === 0 + ? 0 + : trueTop || this.props.sliderLength - this.props.markerSize / 2; + var confined = + unconfined < bottom ? bottom : unconfined > top ? top : unconfined; var slipDisplacement = this.props.touchDimensions.slipDisplacement; - if (Math.abs(gestureState.dy) < slipDisplacement || !slipDisplacement) { + if ( + Math.abs(accumDistanceDisplacement) < slipDisplacement || + !slipDisplacement + ) { var value = positionToValue( confined, this.optionsArray, this.props.sliderLength, + this.props.markerSize, ); var snapped = valueToPosition( value, this.optionsArray, this.props.sliderLength, + this.props.markerSize, ); + + if (this.props.onMarkerOneMoved) { + this.props.onMarkerOneMoved(this.props.snapped ? snapped : confined); + } this.setState({ positionOne: this.props.snapped ? snapped : confined, }); @@ -227,6 +253,11 @@ export default class MultiSlider extends React.Component { change.push(this.state.valueTwo); } this.props.onValuesChange(change); + + this.props.onMarkersPosition([ + this.state.positionOne, + this.state.positionTwo, + ]); }, ); } @@ -238,26 +269,48 @@ export default class MultiSlider extends React.Component { return; } - var unconfined = gestureState.dx + this.state.pastTwo; - var bottom = this.state.positionOne + (this.props.allowOverlap ? 0 : this.stepLength); - var top = this.props.sliderLength; - var confined = unconfined < bottom - ? bottom - : unconfined > top ? top : unconfined; + const accumDistance = this.props.vertical + ? -gestureState.dy + : gestureState.dx; + const accumDistanceDisplacement = this.props.vertical + ? gestureState.dx + : gestureState.dy; + + const unconfined = I18nManager.isRTL + ? this.state.pastTwo - accumDistance + : accumDistance + this.state.pastTwo; + var bottom = + this.state.positionOne + + (this.props.allowOverlap + ? 0 + : this.props.minMarkerOverlapDistance > 0 + ? this.props.minMarkerOverlapDistance + : (this.props.minMarkerOverlapStepDistance || 1) * this.stepLength); + var top = this.props.sliderLength - this.props.markerSize / 2; + var confined = + unconfined < bottom ? bottom : unconfined > top ? top : unconfined; var slipDisplacement = this.props.touchDimensions.slipDisplacement; - if (Math.abs(gestureState.dy) < slipDisplacement || !slipDisplacement) { + if ( + Math.abs(accumDistanceDisplacement) < slipDisplacement || + !slipDisplacement + ) { var value = positionToValue( confined, this.optionsArray, this.props.sliderLength, + this.props.markerSize, ); var snapped = valueToPosition( value, this.optionsArray, this.props.sliderLength, + this.props.markerSize, ); + if (this.props.onMarkerTwoMoved) { + this.props.onMarkerTwoMoved(this.props.snapped ? snapped : confined); + } this.setState({ positionTwo: this.props.snapped ? snapped : confined, }); @@ -268,7 +321,15 @@ export default class MultiSlider extends React.Component { valueTwo: value, }, () => { - this.props.onValuesChange([this.state.valueOne, this.state.valueTwo]); + this.props.onValuesChange([ + this.state.valueOne, + this.state.valueTwo, + ]); + + this.props.onMarkersPosition([ + this.state.positionOne, + this.state.positionTwo, + ]); }, ); } @@ -281,9 +342,19 @@ export default class MultiSlider extends React.Component { return; } + var snapped = valueToPosition( + this.state.valueOne, + this.optionsArray, + this.props.sliderLength, + ); + if (this.props.onMarkerOneMoveEnd) { + this.props.onMarkerOneMoveEnd(this._markerOne); + } + this.setState( { - pastOne: this.state.positionOne, + pastOne: this.props.smoothSnapped ? snapped : this.state.positionOne, + ...(this.props.smoothSnapped ? { positionOne: snapped } : {}), onePressed: !this.state.onePressed, }, () => { @@ -302,10 +373,20 @@ export default class MultiSlider extends React.Component { return; } + var snapped = valueToPosition( + this.state.valueTwo, + this.optionsArray, + this.props.sliderLength, + ); + if (this.props.onMarkerTwoMoveEnd) { + this.props.onMarkerTwoMoveEnd(this._markerTwo); + } + this.setState( { twoPressed: !this.state.twoPressed, - pastTwo: this.state.positionTwo, + pastTwo: this.props.smoothSnapped ? snapped : this.state.positionTwo, + ...(this.props.smoothSnapped ? { positionTwo: snapped } : {}), }, () => { this.props.onValuesChangeFinish([ @@ -316,10 +397,124 @@ export default class MultiSlider extends React.Component { ); }; + componentDidUpdate(prevProps, prevState) { + const { + positionOne: prevPositionOne, + positionTwo: prevPositionTwo, + } = prevState; + + const { positionOne, positionTwo } = this.state; + + if ( + typeof positionOne === 'undefined' && + typeof positionTwo !== 'undefined' + ) { + return; + } + + if (positionOne !== prevPositionOne || positionTwo !== prevPositionTwo) { + this.props.onMarkersPosition([positionOne, positionTwo]); + } + + if (this.state.onePressed || this.state.twoPressed) { + return; + } + + let nextState = {}; + if ( + prevProps.min !== this.props.min || + prevProps.max !== this.props.max || + prevProps.step !== this.props.step || + prevProps.values[0] !== this.props.values[0] || + prevProps.sliderLength !== this.props.sliderLength || + prevProps.values[1] !== this.props.values[1] || + (prevProps.sliderLength !== this.props.sliderLength && + prevProps.values[1]) + ) { + this.optionsArray = + this.props.optionsArray || + createArray(this.props.min, this.props.max, this.props.step); + + this.stepLength = this.props.sliderLength / this.optionsArray.length; + + const positionOne = valueToPosition( + this.props.values[0], + this.optionsArray, + this.props.sliderLength, + this.props.markerSize, + ); + nextState.valueOne = this.props.values[0]; + nextState.pastOne = positionOne; + nextState.positionOne = positionOne; + + const positionTwo = valueToPosition( + this.props.values[1], + this.optionsArray, + this.props.sliderLength, + this.props.markerSize, + ); + nextState.valueTwo = this.props.values[1]; + nextState.pastTwo = positionTwo; + nextState.positionTwo = positionTwo; + + this.setState(nextState); + } + } + + getSteps() { + const stepLength = this.props.sliderLength / (this.optionsArray.length - 1); + const textStyles = [ + styles.stepLabel, + this.props.stepLabelStyle, + ...(this.props.vertical ? [{ transform: [{ rotate: '90deg' }] }] : []), + ]; + const markerHeight = this.props?.trackStyle?.height || styles.track.height; + const markerStyles = [ + styles.stepMarker, + { + height: markerHeight, + width: markerHeight, + borderRadius: markerHeight / 2, + }, + this.props.stepMarkerStyle, + ]; + + return this.optionsArray.map((number, index) => { + var step = this.stepsAs[index]; + return ( + + {this.props.showStepMarkers && + index !== 0 && + index !== this.optionsArray.length - 1 && ( + + )} + {this.props.showStepLabels && ( + {`${step.prefix}${step.stepLabel}${step.suffix}`} + )} + + ); + }); + } + render() { const { positionOne, positionTwo } = this.state; - const { selectedStyle, unselectedStyle, sliderLength, markerOffsetX, markerOffsetY } = this.props; - const twoMarkers = this.props.values.length == 2; // when allowOverlap, positionTwo could be 0, identified as string '0' and throwing 'RawText 0 needs to be wrapped in ' error + const { + selectedStyle, + unselectedStyle, + sliderLength, + markerOffsetX, + markerOffsetY, + } = this.props; + const twoMarkers = this.props.values.length == 2; // when allowOverlap, positionTwo could be 0, identified as string '0' and throwing 'RawText 0 needs to be wrapped in ' error const trackOneLength = positionOne; const trackOneStyle = twoMarkers @@ -332,6 +527,13 @@ export default class MultiSlider extends React.Component { ? selectedStyle || styles.selectedTrack : unselectedStyle; const Marker = this.props.customMarker; + + const MarkerLeft = this.props.customMarkerLeft; + const MarkerRight = this.props.customMarkerRight; + const isMarkersSeparated = this.props.isMarkersSeparated || false; + + const Label = this.props.customLabel; + const { slipDisplacement, height, @@ -340,40 +542,59 @@ export default class MultiSlider extends React.Component { } = this.props.touchDimensions; const touchStyle = { borderRadius: borderRadius || 0, + ...(height && { height }), + ...(width && { width }), + }; + + const markerContainerOne = { + top: markerOffsetY - 24, + left: trackOneLength + markerOffsetX - 24, }; - const markerContainerOne = { top: markerOffsetY - 24, left : trackOneLength + markerOffsetX - 24 } + const markerContainerTwo = { + top: markerOffsetY - 24, + right: trackThreeLength + markerOffsetX - 24, + }; - const markerContainerTwo = { top: markerOffsetY - 24, right: trackThreeLength + markerOffsetX - 24 }; + const containerStyle = [styles.container, this.props.containerStyle]; - return ( - + if (this.props.vertical) { + containerStyle.push({ + transform: [{ rotate: '-90deg' }], + }); + } + + const body = ( + - {twoMarkers && - } + {twoMarkers && ( + + )} + {this.props.showSteps && this.getSteps()} this._markerOne = component} + ref={component => (this._markerOne = component)} {...this._panResponderOne.panHandlers} > - + {isMarkersSeparated === false ? ( + + ) : ( + + )} - {twoMarkers && - positionOne !== this.props.sliderLength && - + {twoMarkers && positionOne !== this.props.sliderLength && ( this._markerTwo = component} - {...this._panResponderTwo.panHandlers} + style={[ + styles.markerContainer, + markerContainerTwo, + this.props.markerContainerStyle, + ]} > - + (this._markerTwo = component)} + {...this._panResponderTwo.panHandlers} + > + {isMarkersSeparated === false ? ( + + ) : ( + + )} + - } + )} + + ); + + return ( + + {this.props.enableLabel && ( + ); } @@ -427,6 +710,7 @@ const styles = StyleSheet.create({ container: { position: 'relative', height: 50, + justifyContent: 'center', }, fullTrack: { flexDirection: 'row', @@ -442,6 +726,11 @@ const styles = StyleSheet.create({ height: 2, backgroundColor: '#CECECE', }, + web: { + height: 2, + borderRadius: 2, + backgroundColor: '#A7A7A7', + }, }), }, selectedTrack: { @@ -452,6 +741,9 @@ const styles = StyleSheet.create({ android: { backgroundColor: '#0D8675', }, + web: { + backgroundColor: '#095FFF', + }, }), }, markerContainer: { @@ -469,6 +761,22 @@ const styles = StyleSheet.create({ backgroundColor: 'transparent', justifyContent: 'center', alignItems: 'center', - alignSelf: 'stretch', + }, + step: { + position: 'absolute', + marginLeft: -5, + }, + stepMarker: { + position: 'absolute', + left: 2, + width: 6, + height: 6, + backgroundColor: '#0000008c', + borderRadius: 3, + }, + stepLabel: { + position: 'absolute', + top: 15, + color: '#333', }, }); diff --git a/README.md b/README.md index 3c9ab1b..8a66a26 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Options to customize track, touch area and provide customer markers and callback ## Examples ``` -cd example +cd example/Basic npm install react-native run-ios react-native run-android @@ -24,3 +24,101 @@ react-native run-android ```bash $ npm install --save @ptomasroos/react-native-multi-slider ``` + +### Usage in a ScrollView + +```js +import MultiSlider from '@ptomasroos/react-native-multi-slider'; + +... + + enableScroll = () => this.setState({ scrollEnabled: true }); + disableScroll = () => this.setState({ scrollEnabled: false }); + + render() { + return ( + + + + ); +``` +### shape up CustomMarker as left and right + +In order to make different styles on markers you can set isMarkersSeparated to true, define customMarkerLeft and customMarkerRight in MultiSlider. for example: + + +```js + { + return () + }} + + customMarkerRight={(e) => { + return () + }} +/> +``` + +### Partial report of the props +Feel free to contribute to this part of the documentation. + + +| Prop name | Default value | Type | Purpouse | +|:---------------------------------------------------------------------------------:|:-------------------------------------------------------------:|:-----------------:|:---------------------------------------:| +| values | [0] | array of numbers | Prefixed values of the slider. | +| onValuesChangeStart | () => {} | function | Callback when the value starts changing | +| onValuesChange | () => {} | function | Callback when the value changes | +| onValuesChangeFinish | (values) => {} | function | Callback when the value stops changing | +| sliderLength | 280 | number | Length of the slider (?) | +| touchDimensions | {height: 50,width: 50,borderRadius: 15,slipDisplacement: 200} | object | (?) | +| enableLabel | | function | Enable the label rendering | +| customLabel | | function | Component used for rendering a label above the cursors. | +| customMarker | | function | Component used for the cursor. | +| customMarkerLeft | | function | Component used for the left cursor. | +| customMarkerRight | | function | Component used for the right cursor. | +| isMarkersSeparated | | boolean | See explaination above in the README.md | +| min | 0 | number | Minimum value available in the slider. | +| max | 10 | number | Maximum value available in the slider. | +| step | 1 | number | Step value of the slider. | +| optionsArray | | array of numbers | Possible values of the slider. Ignores min and max. | +| {container/track/selected/unselected/ markerContainer/marker/pressedMarker/step/stepLabel/StepMarker} Style | | style object | Styles for the slider | +| valuePrefix | | string | Prefix added to the value. | +| valueSuffix | | string | Suffix added to the value. | +| enabledOne | true | boolean | Enables the first cursor | +| enabledTwo | true | boolean | Enables the second cursor | +| stepsAs | [] | array of objects | Use stepsAs when you want to customize the steps-labels. stepsAs expects an array of objects [{index: number, stepLabel: string, prefix: string, suffix: string}]. Where index is for which step you want to customize, and all the other steps will show its index as its stepLabel. Both showSteps and showStepsLabels has to be enabled for stepsAs to be used. | +| showSteps | false | boolean | Show steps | +| showStepMarkers | true | boolean | Show steps-markers on the track, showSteps has to be enabled as well | +| showStepLabels | true | boolean | Show steps-labels underneath the track, showSteps has to be enabled as well | +| onToggleOne | undefined | function callback | Listener when first cursor toggles. | +| onToggleTwo | undefined | function callback | Listener when second cursor toggles. | +| allowOverlap | false | boolean | Allow the overlap within the cursors. | +| snapped | false | boolean | Use this when you want a fixed position for your markers, this will split the slider in N specific positions | +| smoothSnapped | false | boolean | Same as snapped but you can move the slider as usual. When released it will go to the nearest marker | +| vertical | false | boolean | Use vertical orientation instead of horizontal. | +| markerOffsetX | 0 | number | Offset the cursor(s) on the X axis | +| markerOffsetY | 0 | number | Offset the cursor(s) on the Y axis | +| markerSize | 0 | number | It determines the marker margin from the edges of the track, useful to avoid the markers to overflow out of the track. | +| minMarkerOverlapDistance | 0 | number | if this is > 0 and allowOverlap is false, this value will determine the closest two markers can come to each other (in pixels, not steps). This can be used for cases where you have two markers large cursors and you don't want them to overlap. Note that markers will still overlap at the start if starting values are too near. CANNOT be combined with minMarkerOverlapStepDistance | +| minMarkerOverlapStepDistance | 0 | number | if this is > 0 and allowOverlap is false, this value will determine the closest two markers can come to each other (in steps, not pixels). This can be used for cases where you have two markers large cursors and you don't want them to overlap. Note that markers will still overlap at the start if starting values are too near. CANNOT be combined with minMarkerOverlapDistance | +| imageBackgroundSource | undefined | string | Specifies the source as required by [ImageBackground](https://facebook.github.io/react-native/docs/imagebackground)| +| testID | | string | Used to locate this view in end-to-end tests. | + +# Recommendations + +For very large min = 0 & max = 99999999 and very small step = 1, the step generation loop generates very large array which can causes a crash. Its better to dynamically generate a step size in those cases. + +```js +step = Math.round(Math.abs(max - min) / 100) +``` + +Credit https://github.com/ptomasroos/react-native-multi-slider/issues/281#issuecomment-1700770841 diff --git a/converters.js b/converters.js index 1f0b9fd..bf7d61b 100644 --- a/converters.js +++ b/converters.js @@ -1,43 +1,87 @@ -'use strict'; +// Find closest index for a given value +const closest = (array, n) => { + let minI = 0; + let maxI = array.length - 1; -export function valueToPosition(value, valuesArray, sliderLength) { - var arrLength; - var index = valuesArray.indexOf(value); + if (array[minI] > n) { + return minI; + } else if (array[maxI] < n) { + return maxI; + } else if (array[minI] <= n && n <= array[maxI]) { + let closestIndex = null; - if (index === -1) { - //console.log('Invalid value, array does not contain: ', value); - return null; - } else { - arrLength = valuesArray.length - 1; - return sliderLength * index / arrLength; + while (closestIndex === null) { + const midI = Math.round((minI + maxI) / 2); + const midVal = array[midI]; + + if (midVal === n) { + closestIndex = midI; + } else if (maxI === minI + 1) { + const minValue = array[minI]; + const maxValue = array[maxI]; + const deltaMin = Math.abs(minValue - n); + const deltaMax = Math.abs(maxValue - n); + + closestIndex = deltaMax <= deltaMin ? maxI : minI; + } else if (midVal < n) { + minI = midI; + } else if (midVal > n) { + maxI = midI; + } else { + closestIndex = -1; + } + } + + return closestIndex; } -} -export function positionToValue(position, valuesArray, sliderLength) { - var arrLength; - var index; + return -1; +}; + +export function valueToPosition( + value, + valuesArray, + sliderLength, + markerSize = 0, +) { + if (value === undefined) return undefined; + const index = closest(valuesArray, value); + const arrLength = valuesArray.length - 1; + const validIndex = index === -1 ? arrLength : index; + const output = + ((sliderLength - markerSize) * validIndex) / arrLength + markerSize / 2; + return output; +} + +export function positionToValue( + position, + valuesArray, + sliderLength, + markerSize = 0, +) { if (position < 0 || sliderLength < position) { - //console.log('invalid position: ', position); return null; } else { - arrLength = valuesArray.length - 1; - index = arrLength * position / sliderLength; - return valuesArray[Math.round(index)]; + const arrLength = valuesArray.length - 1; + const offset = (position - markerSize / 2) / (sliderLength - markerSize); + const index = + (arrLength * (position - markerSize / 2 + offset * markerSize)) / + sliderLength; + const output = valuesArray[Math.round(index)]; + + return output; } } export function createArray(start, end, step) { - var i; - var length; - var direction = start - end > 0 ? -1 : 1; - var result = []; + const direction = start - end > 0 ? -1 : 1; + const result = []; if (!step) { - //console.log('invalid step: ', step); return result; } else { - length = Math.abs((start - end) / step) + 1; - for (i = 0; i < length; i++) { + const length = Math.abs((start - end) / step) + 1; + for (let i = 0; i < length; i++) { result.push(start + i * Math.abs(step) * direction); } return result; diff --git a/example/.babelrc b/example/.babelrc deleted file mode 100644 index a9ce136..0000000 --- a/example/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["react-native"] -} diff --git a/example/.flowconfig b/example/.flowconfig deleted file mode 100644 index 1dd3eff..0000000 --- a/example/.flowconfig +++ /dev/null @@ -1,45 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore "BUCK" generated dirs -/\.buckd/ - -; Ignore unexpected extra "@providesModule" -.*/node_modules/.*/node_modules/fbjs/.* - -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -.*/Libraries/react-native/React.js -.*/Libraries/react-native/ReactNative.js - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow -flow/ - -[options] -emoji=true - -module.system=haste - -munge_underscores=true - -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' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FixMe - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - -unsafe.enable_getters_and_setters=true - -[version] -^0.47.0 diff --git a/example/CustomMarker.js b/example/CustomMarker.js deleted file mode 100644 index 35fad93..0000000 --- a/example/CustomMarker.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -import React from 'react'; - -import { - StyleSheet, - Image -} from 'react-native'; - -export default class CustomMarker extends React.Component { - render() { - return ( - - ); - } -} - -const styles = StyleSheet.create({ - image: { - height: 40, - width: 40 - } -}); diff --git a/example/Example.js b/example/Example.js index eb47667..c645ade 100644 --- a/example/Example.js +++ b/example/Example.js @@ -47,6 +47,47 @@ class Example extends React.Component { }); } + onMarkerOneMoveStart = (markerOne) => { + markerOne.measure((fx, fy, width, height, px, py) => { + this.setState({ + position: { + x: px, + y: py, + height: height, + diff: 0 + } + }); + }); + } + + lastPos = null; + onMarkerOneMoved = (position) => { + if (!this.lastPos) { + this.lastPos = position; + } + + this.setState({ + position: { + ...this.state.position, + diff: (position - this.lastPos) + } + }) + } + + onMarkerOneMoveEnd = (markerOne) => { + this.lastPos = null; + markerOne.measure((fx, fy, width, height, px, py) => { + this.setState({ + position: { + x: px, + y: py, + height: height, + diff: 0 + } + }); + }); + } + render() { return ( @@ -62,6 +103,9 @@ class Example extends React.Component { onValuesChangeStart={this.sliderOneValuesChangeStart} onValuesChange={this.sliderOneValuesChange} onValuesChangeFinish={this.sliderOneValuesChangeFinish} + onMarkerOneMoveStart={this.onMarkerOneMoveStart} + onMarkerOneMoved={this.onMarkerOneMoved} + onMarkerOneMoveEnd={this.onMarkerOneMoveEnd} /> Two Markers: @@ -72,6 +116,8 @@ class Example extends React.Component { values={[this.state.multiSliderValue[0], this.state.multiSliderValue[1]]} sliderLength={280} onValuesChange={this.multiSliderValuesChange} + onMarkerOneMoved={this.onMarkerOneMoved} + onMarkerTwoMoved={this.onMarkerTwoMoved} min={0} max={10} step={1} @@ -106,6 +152,15 @@ class Example extends React.Component { customMarker={CustomMarker} sliderLength={280} /> + { + this.state.sliderOneChanging && this.state.position ? + : null + } ); } diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro deleted file mode 100644 index 6e8516c..0000000 --- a/example/android/app/proguard-rules.pro +++ /dev/null @@ -1,70 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Disabling obfuscation is useful if you collect stack traces from production crashes -# (unless you are using a system that supports de-obfuscate the stack traces). --dontobfuscate - -# React Native - -# Keep our interfaces so they can be used by other ProGuard rules. -# See http://sourceforge.net/p/proguard/bugs/466/ --keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip --keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters --keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip - -# Do not strip any method/class that is annotated with @DoNotStrip --keep @com.facebook.proguard.annotations.DoNotStrip class * --keep @com.facebook.common.internal.DoNotStrip class * --keepclassmembers class * { - @com.facebook.proguard.annotations.DoNotStrip *; - @com.facebook.common.internal.DoNotStrip *; -} - --keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { - void set*(***); - *** get*(); -} - --keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } --keep class * extends com.facebook.react.bridge.NativeModule { *; } --keepclassmembers,includedescriptorclasses class * { native ; } --keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } - --dontwarn com.facebook.react.** - -# TextLayoutBuilder uses a non-public Android constructor within StaticLayout. -# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. --dontwarn android.text.StaticLayout - -# okhttp - --keepattributes Signature --keepattributes *Annotation* --keep class okhttp3.** { *; } --keep interface okhttp3.** { *; } --dontwarn okhttp3.** - -# okio - --keep class sun.misc.Unsafe { *; } --dontwarn java.nio.file.* --dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement --dontwarn okio.** diff --git a/example/android/app/src/main/java/com/example/MainActivity.java b/example/android/app/src/main/java/com/example/MainActivity.java deleted file mode 100644 index e84b725..0000000 --- a/example/android/app/src/main/java/com/example/MainActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.example; - -import com.facebook.react.ReactActivity; - -public class MainActivity extends ReactActivity { - - /** - * Returns the name of the main component registered from JavaScript. - * This is used to schedule rendering of the component. - */ - @Override - protected String getMainComponentName() { - return "example"; - } -} diff --git a/example/android/app/src/main/java/com/example/MainApplication.java b/example/android/app/src/main/java/com/example/MainApplication.java deleted file mode 100644 index f51721b..0000000 --- a/example/android/app/src/main/java/com/example/MainApplication.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.example; - -import android.app.Application; - -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.shell.MainReactPackage; -import com.facebook.soloader.SoLoader; - -import java.util.Arrays; -import java.util.List; - -public class MainApplication extends Application implements ReactApplication { - - private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - return Arrays.asList( - new MainReactPackage() - ); - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } - - @Override - public void onCreate() { - super.onCreate(); - SoLoader.init(this, /* native exopackage */ false); - } -} diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bc..0000000 Binary files a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0c..0000000 Binary files a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0..0000000 Binary files a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72c..0000000 Binary files a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/values/strings.xml b/example/android/app/src/main/res/values/strings.xml deleted file mode 100644 index d75426c..0000000 --- a/example/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - example - diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index b5166da..0000000 Binary files a/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/example/android/keystores/BUCK b/example/android/keystores/BUCK deleted file mode 100644 index 88e4c31..0000000 --- a/example/android/keystores/BUCK +++ /dev/null @@ -1,8 +0,0 @@ -keystore( - name = "debug", - properties = "debug.keystore.properties", - store = "debug.keystore", - visibility = [ - "PUBLIC", - ], -) diff --git a/example/android/keystores/debug.keystore.properties b/example/android/keystores/debug.keystore.properties deleted file mode 100644 index 121bfb4..0000000 --- a/example/android/keystores/debug.keystore.properties +++ /dev/null @@ -1,4 +0,0 @@ -key.store=debug.keystore -key.alias=androiddebugkey -key.store.password=android -key.alias.password=android diff --git a/example/android/settings.gradle b/example/android/settings.gradle deleted file mode 100644 index 13df8b5..0000000 --- a/example/android/settings.gradle +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = 'example' - -include ':app' diff --git a/example/app.json b/example/app.json deleted file mode 100644 index 486d55b..0000000 --- a/example/app.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "example", - "displayName": "example" -} \ No newline at end of file diff --git a/example/index.android.js b/example/index.android.js deleted file mode 100644 index d1656c3..0000000 --- a/example/index.android.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * @flow - */ - -import React, { Component } from 'react'; -import { - AppRegistry, - StyleSheet, - Text, - View -} from 'react-native'; - -import Example from './Example'; - -AppRegistry.registerComponent('example', () => Example); diff --git a/example/index.ios.js b/example/index.ios.js deleted file mode 100644 index d1656c3..0000000 --- a/example/index.ios.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * @flow - */ - -import React, { Component } from 'react'; -import { - AppRegistry, - StyleSheet, - Text, - View -} from 'react-native'; - -import Example from './Example'; - -AppRegistry.registerComponent('example', () => Example); diff --git a/example/ios/example.xcodeproj/project.pbxproj b/example/ios/example.xcodeproj/project.pbxproj deleted file mode 100644 index e6ce635..0000000 --- a/example/ios/example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1251 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; - 00E356F31AD99517003FC87E /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; - 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; - 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; }; - 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; - 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; - 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; - 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; - 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; - 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; - 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; - 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; - 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTActionSheet; - }; - 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTGeolocation; - }; - 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5115D1A9E6B3D00147676; - remoteInfo = RCTImage; - }; - 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B511DB1A9E6C8500147676; - remoteInfo = RCTNetwork; - }; - 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; - remoteInfo = RCTVibration; - }; - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = example; - }; - 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTSettings; - }; - 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3C86DF461ADF2C930047B81A; - remoteInfo = RCTWebSocket; - }; - 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; - remoteInfo = React; - }; - 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; - remoteInfo = "example-tvOS"; - }; - 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; - remoteInfo = "RCTImage-tvOS"; - }; - 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28471D9B043800D4039D; - remoteInfo = "RCTLinking-tvOS"; - }; - 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28541D9B044C00D4039D; - remoteInfo = "RCTNetwork-tvOS"; - }; - 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28611D9B046600D4039D; - remoteInfo = "RCTSettings-tvOS"; - }; - 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A287B1D9B048500D4039D; - remoteInfo = "RCTText-tvOS"; - }; - 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28881D9B049200D4039D; - remoteInfo = "RCTWebSocket-tvOS"; - }; - 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28131D9B038B00D4039D; - remoteInfo = "React-tvOS"; - }; - 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3C059A1DE3340900C268FA; - remoteInfo = yoga; - }; - 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3C06751DE3340C00C268FA; - remoteInfo = "yoga-tvOS"; - }; - 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; - remoteInfo = cxxreact; - }; - 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; - remoteInfo = "cxxreact-tvOS"; - }; - 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; - remoteInfo = jschelpers; - }; - 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; - remoteInfo = "jschelpers-tvOS"; - }; - 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTAnimation; - }; - 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28201D9B03D100D4039D; - remoteInfo = "RCTAnimation-tvOS"; - }; - 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTLinking; - }; - 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; - 00E356EE1AD99517003FC87E /* exampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = exampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = ""; }; - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; - 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 146834051AC3E58100842450 /* libReact.a in Frameworks */, - 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */, - 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */, - 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, - 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, - 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, - 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, - 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, - 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00C302A81ABCB8CE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302B61ABCB90400DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302BC1ABCB91800DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, - 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302D41ABCB9D200DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, - 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302E01ABCB9EE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, - ); - name = Products; - sourceTree = ""; - }; - 00E356EF1AD99517003FC87E /* exampleTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* exampleTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = exampleTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 139105B71AF99BAD00B5F7CC /* Products */ = { - isa = PBXGroup; - children = ( - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, - 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 139FDEE71B06529A00C62182 /* Products */ = { - isa = PBXGroup; - children = ( - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, - 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* example */ = { - isa = PBXGroup; - children = ( - 008F07F21AC5B25A0029DE68 /* main.jsbundle */, - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = example; - sourceTree = ""; - }; - 146834001AC3E56700842450 /* Products */ = { - isa = PBXGroup; - children = ( - 146834041AC3E56700842450 /* libReact.a */, - 3DAD3EA31DF850E9000B6D8A /* libReact.a */, - 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, - 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, - 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, - 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, - 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, - 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, - ); - name = Products; - sourceTree = ""; - }; - 5E91572E1DD0AC6500FF2AA8 /* Products */ = { - isa = PBXGroup; - children = ( - 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, - 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 78C398B11ACF4ADC00677621 /* Products */ = { - isa = PBXGroup; - children = ( - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, - 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, - 146833FF1AC3E56700842450 /* React.xcodeproj */, - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, - ); - name = Libraries; - sourceTree = ""; - }; - 832341B11AAA6A8300B99B32 /* Products */ = { - isa = PBXGroup; - children = ( - 832341B51AAA6A8300B99B32 /* libRCTText.a */, - 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* example */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* exampleTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* example.app */, - 00E356EE1AD99517003FC87E /* exampleTests.xctest */, - 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */, - 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* exampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */; - buildPhases = ( - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = exampleTests; - productName = exampleTests; - productReference = 00E356EE1AD99517003FC87E /* exampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 13B07F861A680F5B00A75B9A /* example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = example; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* example.app */; - productType = "com.apple.product-type.application"; - }; - 2D02E47A1E0B4A5D006451C7 /* example-tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */; - buildPhases = ( - 2D02E4771E0B4A5D006451C7 /* Sources */, - 2D02E4781E0B4A5D006451C7 /* Frameworks */, - 2D02E4791E0B4A5D006451C7 /* Resources */, - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "example-tvOS"; - productName = "example-tvOS"; - productReference = 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */; - productType = "com.apple.product-type.application"; - }; - 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */; - buildPhases = ( - 2D02E48C1E0B4A5D006451C7 /* Sources */, - 2D02E48D1E0B4A5D006451C7 /* Frameworks */, - 2D02E48E1E0B4A5D006451C7 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, - ); - name = "example-tvOSTests"; - productName = "example-tvOSTests"; - productReference = 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = Facebook; - TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - 2D02E47A1E0B4A5D006451C7 = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - }; - 2D02E48F1E0B4A5D006451C7 = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - TestTargetID = 2D02E47A1E0B4A5D006451C7; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; - ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - }, - { - ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; - ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; - }, - { - ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; - ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - }, - { - ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; - ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - }, - { - ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; - ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - }, - { - ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; - ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - }, - { - ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; - ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - }, - { - ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; - ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - }, - { - ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; - ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - }, - { - ProductGroup = 139FDEE71B06529A00C62182 /* Products */; - ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - }, - { - ProductGroup = 146834001AC3E56700842450 /* Products */; - ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* example */, - 00E356ED1AD99517003FC87E /* exampleTests */, - 2D02E47A1E0B4A5D006451C7 /* example-tvOS */, - 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTActionSheet.a; - remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTGeolocation.a; - remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTImage.a; - remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTNetwork.a; - remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTVibration.a; - remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTSettings.a; - remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocket.a; - remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 146834041AC3E56700842450 /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTImage-tvOS.a"; - remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTLinking-tvOS.a"; - remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTNetwork-tvOS.a"; - remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTSettings-tvOS.a"; - remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTText-tvOS.a"; - remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTWebSocket-tvOS.a"; - remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libyoga.a; - remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libyoga.a; - remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcxxreact.a; - remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcxxreact.a; - remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libjschelpers.a; - remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libjschelpers.a; - remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTAnimation.a; - remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTAnimation-tvOS.a"; - remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTLinking.a; - remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTText.a; - remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E4791E0B4A5D006451C7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48E1E0B4A5D006451C7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; - }; - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Bundle React Native Code And Images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* exampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E4771E0B4A5D006451C7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, - 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48C1E0B4A5D006451C7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* example */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; - 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D02E47A1E0B4A5D006451C7 /* example-tvOS */; - targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = example; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = exampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = exampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - DEAD_CODE_STRIPPING = NO; - INFOPLIST_FILE = example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = example; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - INFOPLIST_FILE = example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = example; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 2D02E4971E0B4A5E006451C7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "example-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Debug; - }; - 2D02E4981E0B4A5E006451C7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "example-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Release; - }; - 2D02E4991E0B4A5E006451C7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "example-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Debug; - }; - 2D02E49A1E0B4A5E006451C7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "example-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D02E4971E0B4A5E006451C7 /* Debug */, - 2D02E4981E0B4A5E006451C7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D02E4991E0B4A5E006451C7 /* Debug */, - 2D02E49A1E0B4A5E006451C7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/example/ios/example/AppDelegate.h b/example/ios/example/AppDelegate.h deleted file mode 100644 index a9654d5..0000000 --- a/example/ios/example/AppDelegate.h +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end diff --git a/example/ios/example/AppDelegate.m b/example/ios/example/AppDelegate.m deleted file mode 100644 index 0f5c06b..0000000 --- a/example/ios/example/AppDelegate.m +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "AppDelegate.h" - -#import -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURL *jsCodeLocation; - - jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; - - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"example" - initialProperties:nil - launchOptions:launchOptions]; - rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/example/ios/example/main.m b/example/ios/example/main.m deleted file mode 100644 index 3d767fc..0000000 --- a/example/ios/example/main.m +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/package.json b/example/package.json deleted file mode 100644 index fcdc87a..0000000 --- a/example/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "example", - "version": "0.0.1", - "private": true, - "scripts": { - "start": "node node_modules/react-native/local-cli/cli.js start", - "sync-rnms": "rm -rf ./node_modules/react-native-multi-slider; sane '/usr/bin/rsync -v -a --exclude .git --exclude example --exclude node_modules ../ ./node_modules/react-native-multi-slider/' .. --glob='{**/*.json,**/*.js}'" - }, - "dependencies": { - "react": "16.0.0-alpha.12", - "react-native": "0.46.4", - "@ptomasroos/react-native-multi-slider": "file:../" - } -} diff --git a/example/tooltip.png b/example/tooltip.png new file mode 100644 index 0000000..437c3d9 Binary files /dev/null and b/example/tooltip.png differ diff --git a/example/.buckconfig b/examples/Basic/.buckconfig similarity index 100% rename from example/.buckconfig rename to examples/Basic/.buckconfig diff --git a/examples/Basic/.eslintrc.js b/examples/Basic/.eslintrc.js new file mode 100644 index 0000000..40c6dcd --- /dev/null +++ b/examples/Basic/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native-community', +}; diff --git a/examples/Basic/.flowconfig b/examples/Basic/.flowconfig new file mode 100644 index 0000000..4afc766 --- /dev/null +++ b/examples/Basic/.flowconfig @@ -0,0 +1,75 @@ +[ignore] +; We fork some components by platform +.*/*[.]android.js + +; Ignore "BUCK" generated dirs +/\.buckd/ + +; Ignore polyfills +node_modules/react-native/Libraries/polyfills/.* + +; These should not be required directly +; require from fbjs/lib instead: require('fbjs/lib/warning') +node_modules/warning/.* + +; Flow doesn't support platforms +.*/Libraries/Utilities/LoadingView.js + +[untyped] +.*/node_modules/@react-native-community/cli/.*/.* + +[include] + +[libs] +node_modules/react-native/Libraries/react-native/react-native-interface.js +node_modules/react-native/flow/ + +[options] +emoji=true + +esproposal.optional_chaining=enable +esproposal.nullish_coalescing=enable + +module.file_ext=.js +module.file_ext=.json +module.file_ext=.ios.js + +munge_underscores=true + +module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation' +module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' +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\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FlowFixMeProps +suppress_type=$FlowFixMeState + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError + +[lints] +sketchy-null-number=warn +sketchy-null-mixed=warn +sketchy-number=warn +untyped-type-import=warn +nonstrict-import=warn +deprecated-type=warn +unsafe-getters-setters=warn +inexact-spread=warn +unnecessary-invariant=warn +signature-verification-failure=warn +deprecated-utility=error + +[strict] +deprecated-type +nonstrict-import +sketchy-null +unclear-type +unsafe-getters-setters +untyped-import +untyped-type-import + +[version] +^0.105.0 diff --git a/example/.gitattributes b/examples/Basic/.gitattributes similarity index 100% rename from example/.gitattributes rename to examples/Basic/.gitattributes diff --git a/example/.gitignore b/examples/Basic/.gitignore similarity index 79% rename from example/.gitignore rename to examples/Basic/.gitignore index 10be197..72933d7 100644 --- a/example/.gitignore +++ b/examples/Basic/.gitignore @@ -1,6 +1,7 @@ # OSX # .DS_Store +Pods # Xcode # @@ -46,8 +47,11 @@ buck-out/ # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md +# https://docs.fastlane.tools/best-practices/source-control/ -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle diff --git a/example/.watchmanconfig b/examples/Basic/.watchmanconfig similarity index 100% rename from example/.watchmanconfig rename to examples/Basic/.watchmanconfig diff --git a/examples/Basic/App.js b/examples/Basic/App.js new file mode 100644 index 0000000..5100aa9 --- /dev/null +++ b/examples/Basic/App.js @@ -0,0 +1,144 @@ +/** + * @format + */ + +import React from 'react'; + +import { StyleSheet, View, Text } from 'react-native'; +import Slider from '@react-native-community/slider'; +import MultiSlider from 'react-native-multi-slider'; +import CustomMarker from './CustomMarker'; +import CustomLabel from './CustomLabel'; + +export default function App() { + const [sliderOneChanging, setSliderOneChanging] = React.useState(false); + const [sliderOneValue, setSliderOneValue] = React.useState([5]); + const [multiSliderValue, setMultiSliderValue] = React.useState([3, 7]); + const [ + nonCollidingMultiSliderValue, + setNonCollidingMultiSliderValue, + ] = React.useState([0, 100]); + + const sliderOneValuesChangeStart = () => setSliderOneChanging(true); + + const sliderOneValuesChange = values => setSliderOneValue(values); + + sliderOneValuesChangeFinish = () => setSliderOneChanging(false); + + multiSliderValuesChange = values => setMultiSliderValue(values); + + nonCollidingMultiSliderValuesChange = values => + setNonCollidingMultiSliderValue(values); + + return ( + + Sliders + + + One Marker with callback example: + + {sliderOneValue} + + + + + Two Markers: + {multiSliderValue[0]} + {multiSliderValue[1]} + + + + + + Two Markers with minimum overlap distance: + + {nonCollidingMultiSliderValue[0]} + {nonCollidingMultiSliderValue[1]} + + + Native RCT Slider + + Custom Marker + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + flexDirection: 'column', + justifyContent: 'center', + alignItems: 'center', + }, + sliders: { + margin: 20, + width: 280, + }, + text: { + alignSelf: 'center', + paddingVertical: 20, + }, + title: { + fontSize: 30, + }, + sliderOne: { + flexDirection: 'row', + justifyContent: 'space-around', + }, +}); diff --git a/examples/Basic/CustomLabel.js b/examples/Basic/CustomLabel.js new file mode 100644 index 0000000..28f3875 --- /dev/null +++ b/examples/Basic/CustomLabel.js @@ -0,0 +1,111 @@ +import React from 'react'; +import { View, Text, StyleSheet, Animated } from 'react-native'; + +const AnimatedView = Animated.createAnimatedComponent(View); + +CustomLabel.defaultProps = { + leftDiff: 0, +}; + +const width = 50; +const pointerWidth = width * 0.47; + +function LabelBase(props) { + const { position, value, leftDiff, pressed } = props; + const scaleValue = React.useRef(new Animated.Value(0.1)); // Behaves oddly if set to 0 + const cachedPressed = React.useRef(pressed); + + React.useEffect(() => { + Animated.timing(scaleValue.current, { + toValue: pressed ? 1 : 0.1, + duration: 200, + delay: pressed ? 0 : 2000, + useNativeDriver: false, + }).start(); + cachedPressed.current = pressed; + }, [pressed]); + + return ( + Number.isFinite(position) && + Number.isFinite(value) && ( + + + {value} + + ) + ); +} + +export default function CustomLabel(props) { + const { + leftDiff, + oneMarkerValue, + twoMarkerValue, + oneMarkerLeftPosition, + twoMarkerLeftPosition, + oneMarkerPressed, + twoMarkerPressed, + } = props; + + return ( + + + + + ); +} + +const styles = StyleSheet.create({ + parentView: { + position: 'relative', + }, + sliderLabel: { + position: 'absolute', + justifyContent: 'center', + bottom: '100%', + width: width, + height: width, + }, + sliderLabelText: { + textAlign: 'center', + lineHeight: width, + borderRadius: width / 2, + borderWidth: 2, + borderColor: '#999', + backgroundColor: '#fff', + flex: 1, + fontSize: 18, + color: '#aaa', + }, + pointer: { + position: 'absolute', + bottom: -pointerWidth / 4, + left: (width - pointerWidth) / 2, + transform: [{ rotate: '45deg' }], + width: pointerWidth, + height: pointerWidth, + backgroundColor: '#999', + }, +}); diff --git a/examples/Basic/CustomMarker.js b/examples/Basic/CustomMarker.js new file mode 100644 index 0000000..c061cd6 --- /dev/null +++ b/examples/Basic/CustomMarker.js @@ -0,0 +1,25 @@ +import React from 'react'; +import { StyleSheet, Image } from 'react-native'; + +class CustomMarker extends React.Component { + render() { + return ( + + ); + } +} + +const styles = StyleSheet.create({ + image: { + height: 40, + width: 40, + }, +}); + +export default CustomMarker; diff --git a/examples/Basic/README.md b/examples/Basic/README.md new file mode 100644 index 0000000..18ba6a7 --- /dev/null +++ b/examples/Basic/README.md @@ -0,0 +1,6 @@ +## FAQ +##### Why is react-native-multi-slider not listed as a dependency in package.json in the example? + +react-native uses metro for dependency resolution. In order to not recursively install this example into the node_modules of this example we use metro.config.js to resolve react-native-multi-slider. + +This also allows a quicker iteration when developing (without having to yarn install after every single change in react-native-multi-slider). \ No newline at end of file diff --git a/example/android/app/BUCK b/examples/Basic/android/app/BUCK similarity index 69% rename from example/android/app/BUCK rename to examples/Basic/android/app/BUCK index c8f5603..acf67af 100644 --- a/example/android/app/BUCK +++ b/examples/Basic/android/app/BUCK @@ -8,23 +8,13 @@ # - `buck install -r android/app` - compile, install and run application # +load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") + lib_deps = [] -for jarfile in glob(['libs/*.jar']): - name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] - lib_deps.append(':' + name) - prebuilt_jar( - name = name, - binary_jar = jarfile, - ) +create_aar_targets(glob(["libs/*.aar"])) -for aarfile in glob(['libs/*.aar']): - name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] - lib_deps.append(':' + name) - android_prebuilt_aar( - name = name, - aar = aarfile, - ) +create_jar_targets(glob(["libs/*.jar"])) android_library( name = "all-libs", @@ -45,12 +35,12 @@ android_library( android_build_config( name = "build_config", - package = "com.example", + package = "com.basic", ) android_resource( name = "res", - package = "com.example", + package = "com.basic", res = "src/main/res", ) diff --git a/example/android/app/build.gradle b/examples/Basic/android/app/build.gradle similarity index 65% rename from example/android/app/build.gradle rename to examples/Basic/android/app/build.gradle index 5cc5e59..b51732a 100644 --- a/example/android/app/build.gradle +++ b/examples/Basic/android/app/build.gradle @@ -18,6 +18,9 @@ import com.android.build.OutputFile * // the entry file for bundle generation * entryFile: "index.android.js", * + * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format + * bundleCommand: "ram-bundle", + * * // whether to bundle JS and assets in debug mode * bundleInDebug: false, * @@ -72,6 +75,11 @@ import com.android.build.OutputFile * ] */ +project.ext.react = [ + entryFile: "index.js", + enableHermes: false, // clean and rebuild if changing +] + apply from: "../../node_modules/react-native/react.gradle" /** @@ -89,30 +97,67 @@ def enableSeparateBuildPerCPUArchitecture = false */ def enableProguardInReleaseBuilds = false +/** + * The preferred build flavor of JavaScriptCore. + * + * For example, to use the international variant, you can use: + * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * + * The international variant includes ICU i18n library and necessary data + * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that + * give correct results when using with locales other than en-US. Note that + * this variant is about 6MiB larger per architecture than default. + */ +def jscFlavor = 'org.webkit:android-jsc:+' + +/** + * Whether to enable the Hermes VM. + * + * This should be set on project.ext.react and mirrored here. If it is not set + * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode + * and the benefits of using Hermes will therefore be sharply reduced. + */ +def enableHermes = project.ext.react.get("enableHermes", false); + android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion rootProject.ext.compileSdkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } defaultConfig { - applicationId "com.example" - minSdkVersion 16 - targetSdkVersion 22 + applicationId "com.basic" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK - include "armeabi-v7a", "x86" + include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + } + } + signingConfigs { + debug { + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' } } buildTypes { + debug { + signingConfig signingConfigs.debug + } release { + // Caution! In production, you need to generate your own keystore file. + // see https://facebook.github.io/react-native/docs/signed-apk-android. + signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } @@ -121,21 +166,29 @@ android { applicationVariants.all { variant -> variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: - // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits - def versionCodes = ["armeabi-v7a":1, "x86":2] + // https://developer.android.com/studio/build/configure-apk-splits.html + def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = versionCodes.get(abi) * 1048576 + defaultConfig.versionCode } + } } } dependencies { - compile fileTree(dir: "libs", include: ["*.jar"]) - compile "com.android.support:appcompat-v7:23.0.1" - compile "com.facebook.react:react-native:+" // From node_modules + implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation "com.facebook.react:react-native:+" // From node_modules + + if (enableHermes) { + def hermesPath = "../../node_modules/hermes-engine/android/"; + debugImplementation files(hermesPath + "hermes-debug.aar") + releaseImplementation files(hermesPath + "hermes-release.aar") + } else { + implementation jscFlavor + } } // Run this once to be able to run the application with BUCK @@ -144,3 +197,5 @@ task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' } + +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/examples/Basic/android/app/build_defs.bzl b/examples/Basic/android/app/build_defs.bzl new file mode 100644 index 0000000..fff270f --- /dev/null +++ b/examples/Basic/android/app/build_defs.bzl @@ -0,0 +1,19 @@ +"""Helper definitions to glob .aar and .jar targets""" + +def create_aar_targets(aarfiles): + for aarfile in aarfiles: + name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] + lib_deps.append(":" + name) + android_prebuilt_aar( + name = name, + aar = aarfile, + ) + +def create_jar_targets(jarfiles): + for jarfile in jarfiles: + name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] + lib_deps.append(":" + name) + prebuilt_jar( + name = name, + binary_jar = jarfile, + ) diff --git a/examples/Basic/android/app/debug.keystore b/examples/Basic/android/app/debug.keystore new file mode 100644 index 0000000..364e105 Binary files /dev/null and b/examples/Basic/android/app/debug.keystore differ diff --git a/examples/Basic/android/app/proguard-rules.pro b/examples/Basic/android/app/proguard-rules.pro new file mode 100644 index 0000000..11b0257 --- /dev/null +++ b/examples/Basic/android/app/proguard-rules.pro @@ -0,0 +1,10 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: diff --git a/examples/Basic/android/app/src/debug/AndroidManifest.xml b/examples/Basic/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..fa26aa5 --- /dev/null +++ b/examples/Basic/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/example/android/app/src/main/AndroidManifest.xml b/examples/Basic/android/app/src/main/AndroidManifest.xml similarity index 75% rename from example/android/app/src/main/AndroidManifest.xml rename to examples/Basic/android/app/src/main/AndroidManifest.xml index 8275835..d027f15 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/examples/Basic/android/app/src/main/AndroidManifest.xml @@ -1,20 +1,14 @@ + package="com.basic"> - - - getPackages() { + @SuppressWarnings("UnnecessaryLocalVariable") + List packages = new PackageList(this).getPackages(); + // Packages that cannot be autolinked yet can be added manually here, for example: + // packages.add(new MyReactNativePackage()); + return packages; + } + + @Override + protected String getJSMainModuleName() { + return "index"; + } + }; + + @Override + public ReactNativeHost getReactNativeHost() { + return mReactNativeHost; + } + + @Override + public void onCreate() { + super.onCreate(); + SoLoader.init(this, /* native exopackage */ false); + initializeFlipper(this); // Remove this line if you don't want Flipper enabled + } + + /** + * Loads Flipper in React Native templates. + * + * @param context + */ + private static void initializeFlipper(Context context) { + if (BuildConfig.DEBUG) { + try { + /* + We use reflection here to pick up the class that initializes Flipper, + since Flipper library is not available in release mode + */ + Class aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper"); + aClass.getMethod("initializeFlipper", Context.class).invoke(null, context); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + } + } +} diff --git a/examples/Basic/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/Basic/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..a2f5908 Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/examples/Basic/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..1b52399 Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/Basic/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..ff10afd Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/examples/Basic/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..115a4c7 Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/Basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..dcd3cd8 Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/examples/Basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..459ca60 Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/Basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..8ca12fe Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/examples/Basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..8e19b41 Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/Basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..b824ebd Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/examples/Basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/examples/Basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..4c19a13 Binary files /dev/null and b/examples/Basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/examples/Basic/android/app/src/main/res/values/strings.xml b/examples/Basic/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..8d8451b --- /dev/null +++ b/examples/Basic/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Basic + diff --git a/example/android/app/src/main/res/values/styles.xml b/examples/Basic/android/app/src/main/res/values/styles.xml similarity index 78% rename from example/android/app/src/main/res/values/styles.xml rename to examples/Basic/android/app/src/main/res/values/styles.xml index 319eb0c..62fe59f 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/examples/Basic/android/app/src/main/res/values/styles.xml @@ -3,6 +3,7 @@ diff --git a/example/android/build.gradle b/examples/Basic/android/build.gradle similarity index 52% rename from example/android/build.gradle rename to examples/Basic/android/build.gradle index eed9972..28f7ec6 100644 --- a/example/android/build.gradle +++ b/examples/Basic/android/build.gradle @@ -1,11 +1,18 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + ext { + buildToolsVersion = "28.0.3" + minSdkVersion = 16 + compileSdkVersion = 28 + targetSdkVersion = 28 + } repositories { + google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.3' + classpath("com.android.tools.build:gradle:3.4.2") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -15,10 +22,17 @@ buildscript { allprojects { repositories { mavenLocal() - jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url "$rootDir/../node_modules/react-native/android" + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") } + + google() + jcenter() + maven { url 'https://jitpack.io' } } } diff --git a/example/android/gradle.properties b/examples/Basic/android/gradle.properties similarity index 94% rename from example/android/gradle.properties rename to examples/Basic/android/gradle.properties index 1fd964e..027ef9d 100644 --- a/example/android/gradle.properties +++ b/examples/Basic/android/gradle.properties @@ -17,4 +17,5 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -android.useDeprecatedNdk=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/examples/Basic/android/gradle/wrapper/gradle-wrapper.jar b/examples/Basic/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..5c2d1cf Binary files /dev/null and b/examples/Basic/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/examples/Basic/android/gradle/wrapper/gradle-wrapper.properties similarity index 91% rename from example/android/gradle/wrapper/gradle-wrapper.properties rename to examples/Basic/android/gradle/wrapper/gradle-wrapper.properties index dbdc05d..e0c4de3 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/examples/Basic/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/example/android/gradlew b/examples/Basic/android/gradlew similarity index 73% rename from example/android/gradlew rename to examples/Basic/android/gradlew index 91a7e26..b0d6d0a 100755 --- a/example/android/gradlew +++ b/examples/Basic/android/gradlew @@ -1,4 +1,20 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## ## @@ -6,20 +22,38 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -30,6 +64,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +75,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +105,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +129,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +170,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/example/android/gradlew.bat b/examples/Basic/android/gradlew.bat similarity index 71% rename from example/android/gradlew.bat rename to examples/Basic/android/gradlew.bat index aec9973..15e1ee3 100644 --- a/example/android/gradlew.bat +++ b/examples/Basic/android/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,14 +24,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +62,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +75,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/examples/Basic/android/settings.gradle b/examples/Basic/android/settings.gradle new file mode 100644 index 0000000..7bcdf06 --- /dev/null +++ b/examples/Basic/android/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = 'Basic' +apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) +include ':app' diff --git a/examples/Basic/app.json b/examples/Basic/app.json new file mode 100644 index 0000000..05d2514 --- /dev/null +++ b/examples/Basic/app.json @@ -0,0 +1,4 @@ +{ + "name": "Basic", + "displayName": "Basic" +} \ No newline at end of file diff --git a/examples/Basic/babel.config.js b/examples/Basic/babel.config.js new file mode 100644 index 0000000..f842b77 --- /dev/null +++ b/examples/Basic/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['module:metro-react-native-babel-preset'], +}; diff --git a/example/diamond.png b/examples/Basic/diamond.png similarity index 100% rename from example/diamond.png rename to examples/Basic/diamond.png diff --git a/examples/Basic/index.js b/examples/Basic/index.js new file mode 100644 index 0000000..5e99b7f --- /dev/null +++ b/examples/Basic/index.js @@ -0,0 +1,7 @@ +/** @format */ + +import { AppRegistry } from 'react-native'; +import App from './App'; +import { name as appName } from './app.json'; + +AppRegistry.registerComponent(appName, () => App); diff --git a/example/ios/example-tvOS/Info.plist b/examples/Basic/ios/Basic-tvOS/Info.plist similarity index 89% rename from example/ios/example-tvOS/Info.plist rename to examples/Basic/ios/Basic-tvOS/Info.plist index 2fb6a11..ecbd496 100644 --- a/example/ios/example-tvOS/Info.plist +++ b/examples/Basic/ios/Basic-tvOS/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,6 +22,19 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSLocationWhenInUseUsageDescription + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -36,19 +49,5 @@ UIViewControllerBasedStatusBarAppearance - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - diff --git a/example/ios/example-tvOSTests/Info.plist b/examples/Basic/ios/Basic-tvOSTests/Info.plist similarity index 100% rename from example/ios/example-tvOSTests/Info.plist rename to examples/Basic/ios/Basic-tvOSTests/Info.plist diff --git a/examples/Basic/ios/Basic.xcodeproj/project.pbxproj b/examples/Basic/ios/Basic.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7beb4b5 --- /dev/null +++ b/examples/Basic/ios/Basic.xcodeproj/project.pbxproj @@ -0,0 +1,923 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00E356F31AD99517003FC87E /* BasicTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BasicTests.m */; }; + 1369E49E0E6583557305DB4B /* libPods-Basic-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C83C04665ADBD567E3AEBFC /* libPods-Basic-tvOS.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 1EEF54E2ECC55A285A1C4B1A /* libPods-Basic.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 854C01FA596EBA7031CA5226 /* libPods-Basic.a */; }; + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 2DCD954D1E0B4F2C00145EB5 /* BasicTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BasicTests.m */; }; + A7DAEB54926AB1D254FBDA2E /* libPods-Basic-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CAC6A70AA12B52AB8ACE4EB /* libPods-Basic-tvOSTests.a */; }; + E62E22760D5C27D64B7E77CE /* libPods-BasicTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A50AE2580351EABFD9F3FC /* libPods-BasicTests.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = Basic; + }; + 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; + remoteInfo = "Basic-tvOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00E356EE1AD99517003FC87E /* BasicTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BasicTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* BasicTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BasicTests.m; sourceTree = ""; }; + 020D38228DADEAF1B29BE57C /* Pods-BasicTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BasicTests.debug.xcconfig"; path = "Target Support Files/Pods-BasicTests/Pods-BasicTests.debug.xcconfig"; sourceTree = ""; }; + 0A0736ED93A3B25CDCBDBCE5 /* Pods-Basic.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Basic.debug.xcconfig"; path = "Target Support Files/Pods-Basic/Pods-Basic.debug.xcconfig"; sourceTree = ""; }; + 0C83C04665ADBD567E3AEBFC /* libPods-Basic-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Basic-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 12D7D83759CB80629C60C81D /* Pods-Basic-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Basic-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Basic-tvOS/Pods-Basic-tvOS.debug.xcconfig"; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* Basic.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Basic.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Basic/AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Basic/AppDelegate.m; sourceTree = ""; }; + 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Basic/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Basic/Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Basic/main.m; sourceTree = ""; }; + 2D02E47B1E0B4A5D006451C7 /* Basic-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Basic-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D02E4901E0B4A5D006451C7 /* Basic-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Basic-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 783B2BB107238D325044099A /* Pods-Basic-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Basic-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-Basic-tvOSTests/Pods-Basic-tvOSTests.debug.xcconfig"; sourceTree = ""; }; + 854C01FA596EBA7031CA5226 /* libPods-Basic.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Basic.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8CAC6A70AA12B52AB8ACE4EB /* libPods-Basic-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Basic-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8CD12A7B8881B82CAB25BCB4 /* Pods-Basic-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Basic-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Basic-tvOS/Pods-Basic-tvOS.release.xcconfig"; sourceTree = ""; }; + 8E3EBED2EDD478B841631228 /* Pods-Basic.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Basic.release.xcconfig"; path = "Target Support Files/Pods-Basic/Pods-Basic.release.xcconfig"; sourceTree = ""; }; + B53D25E3735E4C1D017EF36B /* Pods-BasicTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BasicTests.release.xcconfig"; path = "Target Support Files/Pods-BasicTests/Pods-BasicTests.release.xcconfig"; sourceTree = ""; }; + B5A50AE2580351EABFD9F3FC /* libPods-BasicTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BasicTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + D41B0751FC39CDE651D098CC /* Pods-Basic-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Basic-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-Basic-tvOSTests/Pods-Basic-tvOSTests.release.xcconfig"; sourceTree = ""; }; + ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E62E22760D5C27D64B7E77CE /* libPods-BasicTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1EEF54E2ECC55A285A1C4B1A /* libPods-Basic.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1369E49E0E6583557305DB4B /* libPods-Basic-tvOS.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A7DAEB54926AB1D254FBDA2E /* libPods-Basic-tvOSTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00E356EF1AD99517003FC87E /* BasicTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* BasicTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = BasicTests; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* Basic */ = { + isa = PBXGroup; + children = ( + 008F07F21AC5B25A0029DE68 /* main.jsbundle */, + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = Basic; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + ED2971642150620600B7C4FE /* JavaScriptCore.framework */, + 854C01FA596EBA7031CA5226 /* libPods-Basic.a */, + 0C83C04665ADBD567E3AEBFC /* libPods-Basic-tvOS.a */, + 8CAC6A70AA12B52AB8ACE4EB /* libPods-Basic-tvOSTests.a */, + B5A50AE2580351EABFD9F3FC /* libPods-BasicTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* Basic */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* BasicTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + DEEAB29B1A9F06A5CF1953F3 /* Pods */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* Basic.app */, + 00E356EE1AD99517003FC87E /* BasicTests.xctest */, + 2D02E47B1E0B4A5D006451C7 /* Basic-tvOS.app */, + 2D02E4901E0B4A5D006451C7 /* Basic-tvOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + DEEAB29B1A9F06A5CF1953F3 /* Pods */ = { + isa = PBXGroup; + children = ( + 0A0736ED93A3B25CDCBDBCE5 /* Pods-Basic.debug.xcconfig */, + 8E3EBED2EDD478B841631228 /* Pods-Basic.release.xcconfig */, + 12D7D83759CB80629C60C81D /* Pods-Basic-tvOS.debug.xcconfig */, + 8CD12A7B8881B82CAB25BCB4 /* Pods-Basic-tvOS.release.xcconfig */, + 783B2BB107238D325044099A /* Pods-Basic-tvOSTests.debug.xcconfig */, + D41B0751FC39CDE651D098CC /* Pods-Basic-tvOSTests.release.xcconfig */, + 020D38228DADEAF1B29BE57C /* Pods-BasicTests.debug.xcconfig */, + B53D25E3735E4C1D017EF36B /* Pods-BasicTests.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* BasicTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BasicTests" */; + buildPhases = ( + 1B8DDC6DE7113B913FD7038C /* [CP] Check Pods Manifest.lock */, + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = BasicTests; + productName = BasicTests; + productReference = 00E356EE1AD99517003FC87E /* BasicTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* Basic */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Basic" */; + buildPhases = ( + C6880AFF1521603957665D18 /* [CP] Check Pods Manifest.lock */, + FD10A7F022414F080027D42C /* Start Packager */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Basic; + productName = Basic; + productReference = 13B07F961A680F5B00A75B9A /* Basic.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E47A1E0B4A5D006451C7 /* Basic-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Basic-tvOS" */; + buildPhases = ( + 2A6F39E1440D9E3178E138CD /* [CP] Check Pods Manifest.lock */, + FD10A7F122414F3F0027D42C /* Start Packager */, + 2D02E4771E0B4A5D006451C7 /* Sources */, + 2D02E4781E0B4A5D006451C7 /* Frameworks */, + 2D02E4791E0B4A5D006451C7 /* Resources */, + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Basic-tvOS"; + productName = "Basic-tvOS"; + productReference = 2D02E47B1E0B4A5D006451C7 /* Basic-tvOS.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E48F1E0B4A5D006451C7 /* Basic-tvOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Basic-tvOSTests" */; + buildPhases = ( + A1536384F974A92D9C941357 /* [CP] Check Pods Manifest.lock */, + 2D02E48C1E0B4A5D006451C7 /* Sources */, + 2D02E48D1E0B4A5D006451C7 /* Frameworks */, + 2D02E48E1E0B4A5D006451C7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, + ); + name = "Basic-tvOSTests"; + productName = "Basic-tvOSTests"; + productReference = 2D02E4901E0B4A5D006451C7 /* Basic-tvOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0940; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 2D02E47A1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 2D02E48F1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + TestTargetID = 2D02E47A1E0B4A5D006451C7; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Basic" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* Basic */, + 00E356ED1AD99517003FC87E /* BasicTests */, + 2D02E47A1E0B4A5D006451C7 /* Basic-tvOS */, + 2D02E48F1E0B4A5D006451C7 /* Basic-tvOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4791E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48E1E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; + 1B8DDC6DE7113B913FD7038C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-BasicTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 2A6F39E1440D9E3178E138CD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Basic-tvOS-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native Code And Images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; + A1536384F974A92D9C941357 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Basic-tvOSTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C6880AFF1521603957665D18 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Basic-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FD10A7F022414F080027D42C /* Start Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Start Packager"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; + }; + FD10A7F122414F3F0027D42C /* Start Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Start Packager"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* BasicTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4771E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48C1E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2DCD954D1E0B4F2C00145EB5 /* BasicTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* Basic */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D02E47A1E0B4A5D006451C7 /* Basic-tvOS */; + targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 13B07FB21A68108700A75B9A /* Base */, + ); + name = LaunchScreen.xib; + path = Basic; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 020D38228DADEAF1B29BE57C /* Pods-BasicTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = BasicTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Basic.app/Basic"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B53D25E3735E4C1D017EF36B /* Pods-BasicTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = BasicTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Basic.app/Basic"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0A0736ED93A3B25CDCBDBCE5 /* Pods-Basic.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = NO; + INFOPLIST_FILE = Basic/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = Basic; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8E3EBED2EDD478B841631228 /* Pods-Basic.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = Basic/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = Basic; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 2D02E4971E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 12D7D83759CB80629C60C81D /* Pods-Basic-tvOS.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Basic-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Basic-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Debug; + }; + 2D02E4981E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8CD12A7B8881B82CAB25BCB4 /* Pods-Basic-tvOS.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Basic-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Basic-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Release; + }; + 2D02E4991E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 783B2BB107238D325044099A /* Pods-Basic-tvOSTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Basic-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Basic-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Basic-tvOS.app/Basic-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Debug; + }; + 2D02E49A1E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D41B0751FC39CDE651D098CC /* Pods-Basic-tvOSTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Basic-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Basic-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Basic-tvOS.app/Basic-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BasicTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Basic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Basic-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4971E0B4A5E006451C7 /* Debug */, + 2D02E4981E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Basic-tvOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4991E0B4A5E006451C7 /* Debug */, + 2D02E49A1E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Basic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme b/examples/Basic/ios/Basic.xcodeproj/xcshareddata/xcschemes/Basic-tvOS.xcscheme similarity index 79% rename from example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme rename to examples/Basic/ios/Basic.xcodeproj/xcshareddata/xcschemes/Basic-tvOS.xcscheme index a36391c..0a2c0ba 100644 --- a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme +++ b/examples/Basic/ios/Basic.xcodeproj/xcshareddata/xcschemes/Basic-tvOS.xcscheme @@ -1,6 +1,6 @@ + BuildableName = "Basic-tvOS.app" + BlueprintName = "Basic-tvOS" + ReferencedContainer = "container:Basic.xcodeproj"> + BuildableName = "Basic-tvOSTests.xctest" + BlueprintName = "Basic-tvOSTests" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -61,9 +61,9 @@ + BuildableName = "Basic-tvOSTests.xctest" + BlueprintName = "Basic-tvOSTests" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -71,9 +71,9 @@ + BuildableName = "Basic-tvOS.app" + BlueprintName = "Basic-tvOS" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -94,9 +94,9 @@ + BuildableName = "Basic-tvOS.app" + BlueprintName = "Basic-tvOS" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -113,9 +113,9 @@ + BuildableName = "Basic-tvOS.app" + BlueprintName = "Basic-tvOS" + ReferencedContainer = "container:Basic.xcodeproj"> diff --git a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme b/examples/Basic/ios/Basic.xcodeproj/xcshareddata/xcschemes/Basic.xcscheme similarity index 80% rename from example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme rename to examples/Basic/ios/Basic.xcodeproj/xcshareddata/xcschemes/Basic.xcscheme index eae9513..4ebd4f9 100644 --- a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +++ b/examples/Basic/ios/Basic.xcodeproj/xcshareddata/xcschemes/Basic.xcscheme @@ -1,6 +1,6 @@ + BuildableName = "Basic.app" + BlueprintName = "Basic" + ReferencedContainer = "container:Basic.xcodeproj"> + BuildableName = "BasicTests.xctest" + BlueprintName = "BasicTests" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -61,9 +61,9 @@ + BuildableName = "BasicTests.xctest" + BlueprintName = "BasicTests" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -71,9 +71,9 @@ + BuildableName = "Basic.app" + BlueprintName = "Basic" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -94,9 +94,9 @@ + BuildableName = "Basic.app" + BlueprintName = "Basic" + ReferencedContainer = "container:Basic.xcodeproj"> @@ -113,9 +113,9 @@ + BuildableName = "Basic.app" + BlueprintName = "Basic" + ReferencedContainer = "container:Basic.xcodeproj"> diff --git a/examples/Basic/ios/Basic.xcworkspace/contents.xcworkspacedata b/examples/Basic/ios/Basic.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..550a168 --- /dev/null +++ b/examples/Basic/ios/Basic.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/examples/Basic/ios/Basic/AppDelegate.h b/examples/Basic/ios/Basic/AppDelegate.h new file mode 100644 index 0000000..2726d5e --- /dev/null +++ b/examples/Basic/ios/Basic/AppDelegate.h @@ -0,0 +1,15 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/examples/Basic/ios/Basic/AppDelegate.m b/examples/Basic/ios/Basic/AppDelegate.m new file mode 100644 index 0000000..f910e83 --- /dev/null +++ b/examples/Basic/ios/Basic/AppDelegate.m @@ -0,0 +1,42 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import "AppDelegate.h" + +#import +#import +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge + moduleName:@"Basic" + initialProperties:nil]; + + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/example/ios/example/Base.lproj/LaunchScreen.xib b/examples/Basic/ios/Basic/Base.lproj/LaunchScreen.xib similarity index 93% rename from example/ios/example/Base.lproj/LaunchScreen.xib rename to examples/Basic/ios/Basic/Base.lproj/LaunchScreen.xib index 9e04807..7b8f82a 100644 --- a/example/ios/example/Base.lproj/LaunchScreen.xib +++ b/examples/Basic/ios/Basic/Base.lproj/LaunchScreen.xib @@ -18,7 +18,7 @@ -