From 9a8c75d2a62abd9add614651e9a70e37a5ff1f5a Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 30 Jul 2016 00:21:50 -0400 Subject: [PATCH 1/7] Added Menu #2 and Linter --- app/actions/map.actions.js | 6 +- app/actions/menu.actions.js | 8 +- app/actions/modal.actions.js | 1 - app/app.js | 31 +- app/assets/images/icons/menu/menu@1x.png | Bin 0 -> 144 bytes app/assets/images/icons/menu/menu@2x.png | Bin 0 -> 218 bytes app/assets/images/icons/menu/menu@3x.png | Bin 0 -> 410 bytes app/countdown.js | 51 +- app/fetch.js | 19 +- app/fetching.js | 73 +-- app/icon.js | 16 + app/index.js | 2 +- app/loading.js | 38 +- app/main-layout.js | 35 -- app/map.js | 121 +++-- app/menu.js | 25 +- app/pokeball.js | 8 +- app/pokedex.js | 606 +++++++++++------------ app/pokemarker.js | 35 +- app/pokeview.js | 4 +- package.json | 26 + 21 files changed, 573 insertions(+), 532 deletions(-) create mode 100755 app/assets/images/icons/menu/menu@1x.png create mode 100755 app/assets/images/icons/menu/menu@2x.png create mode 100755 app/assets/images/icons/menu/menu@3x.png create mode 100644 app/icon.js delete mode 100755 app/main-layout.js diff --git a/app/actions/map.actions.js b/app/actions/map.actions.js index df8e62f..7c31a17 100755 --- a/app/actions/map.actions.js +++ b/app/actions/map.actions.js @@ -14,7 +14,7 @@ EventHorizon.createAction('map', 'UPDATE_MAP_REGION', (store, region, update) => EventHorizon.createAction('map', 'SET_MAP_LOADING', (store, data, update) => { update({ loading: true, - }) + }); }); EventHorizon.createAction('map', 'UPDATE_MAP_POKEMON', (store, pokemon, update) => { @@ -22,7 +22,7 @@ EventHorizon.createAction('map', 'UPDATE_MAP_POKEMON', (store, pokemon, update) update({ pokemon, loading: false, - }) + }); }); EventHorizon.createAction('map', 'REMOVE_MAP_POKEMON', (store, index, update) => { @@ -31,7 +31,7 @@ EventHorizon.createAction('map', 'REMOVE_MAP_POKEMON', (store, index, update) => ...store.pokemon.slice(0, index), ...store.pokemon.slice(index + 1), ], - }) + }); }); export const updateRegion = (region) => EventHorizon.dispatch('UPDATE_MAP_REGION', region); diff --git a/app/actions/menu.actions.js b/app/actions/menu.actions.js index 37ca90b..db18c1c 100644 --- a/app/actions/menu.actions.js +++ b/app/actions/menu.actions.js @@ -1,12 +1,16 @@ import EventHorizon from 'react-native-event-horizon'; -import fetchPokemon from '../fetch'; EventHorizon.createAction('menu', 'TRIGGER_OPEN_MENU', (store, open, update) => { - console.log('MENU', open); if (store.open !== open) { update({ open }); } }); +EventHorizon.createAction('menu', 'TOGGLE_OPEN_MENU', (store, data, update) => { + update({ open: !store.open }); +}); + export const openMenu = () => EventHorizon.dispatch('TRIGGER_OPEN_MENU', true); export const closeMenu = () => EventHorizon.dispatch('TRIGGER_OPEN_MENU', false); +export const setMenuState = (open) => EventHorizon.dispatch('TRIGGER_OPEN_MENU', open); +export const toggleMenu = () => EventHorizon.dispatch('TOGGLE_OPEN_MENU'); diff --git a/app/actions/modal.actions.js b/app/actions/modal.actions.js index 2aa4075..9ea84e2 100644 --- a/app/actions/modal.actions.js +++ b/app/actions/modal.actions.js @@ -1,5 +1,4 @@ import EventHorizon from 'react-native-event-horizon'; -import fetchPokemon from '../fetch'; EventHorizon.createAction('modal', 'MODAL_VIEW_POKEMON', (store, pokemonId, update) => { update({ diff --git a/app/app.js b/app/app.js index 14e520f..c962af4 100644 --- a/app/app.js +++ b/app/app.js @@ -2,36 +2,31 @@ * Sample React Native App * https://github.com/facebook/react-native */ -import React, { Component } from 'react'; +import React from 'react'; import { AppRegistry, StyleSheet, - Text, View, -} from 'react-native' +} from 'react-native'; import './index'; import Map from './map'; import Fetching from './fetching'; import Menu from './menu'; -class App extends Component { - render() { - return ( - - - - - - - ); - } -} - const styles = StyleSheet.create({ container: { - flex:1, - flexDirection: 'column' + flex: 1, + flexDirection: 'column', }, }); +const App = () => ( + + + + + + +); + AppRegistry.registerComponent('pokelert', () => App); diff --git a/app/assets/images/icons/menu/menu@1x.png b/app/assets/images/icons/menu/menu@1x.png new file mode 100755 index 0000000000000000000000000000000000000000..dc413f19d9279197d42336a4df5a18332dd6236e GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj;hrvzAs*guryk^GP~c&Dnb!C0 z*{od+>vtbRH&vFp{*Wzkk*M=s se^E>Dq3$8pUk?)k${Kvv|7qrZcaC%72dDSyKr0wLUHx3vIVCg!0E<2|Qvd(} literal 0 HcmV?d00001 diff --git a/app/assets/images/icons/menu/menu@2x.png b/app/assets/images/icons/menu/menu@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..7d3956823911875f5d0f8a1948b2c53b21e262c0 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtg`O^sAsNnZr(YCoFyJ`)=E<&^ zdCS_BP2}G{cw`?Sv}H%%v-4SX{|>WVVl!R9=&``jQrPeoU z)ct3_^aE(1U&0Zsi*@3g80}8}mV6~!@$K;EiSL{;+2JPrVK&y_Tda1^W*N}244$rj JF6*2UngG>+QU?G4 literal 0 HcmV?d00001 diff --git a/app/assets/images/icons/menu/menu@3x.png b/app/assets/images/icons/menu/menu@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..124893531ef84171ac01e8a58c37600800df87cd GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7Ro>U`+IMaSW-5dwc65Z;OGzQHLPQ z61KUGE0UDfW*#{B?C+C2S=%cI7JYf(&iKJSpn)lYS>iquR|9WC4Yvk^S;I%&1q?SB zj%|lZm~j+5GVVF{pS!|c`hb2sF6HH-febkekE0zJH!$|(GqN6FGuX!}!XSO%hgbl9 zi34nmc{ObpfBX||{49=QHN;If6b>|>H;}p?%5n~;?J&pU@ { - let days = Math.floor(sec_num / (3600 * 24)); - let hours = Math.floor((sec_num - (days * (3600 * 24)))/3600); - let minutes = Math.floor((sec_num - (days * (3600 * 24)) - (hours * 3600)) / 60); - let seconds = Math.floor(sec_num - (days * (3600 * 24)) - (hours * 3600) - (minutes * 60)); +const getTime = (secs) => { + const days = Math.floor(secs / (3600 * 24)); + const hours = Math.floor((secs - (days * (3600 * 24))) / 3600); + let minutes = Math.floor((secs - (days * (3600 * 24)) - (hours * 3600)) / 60); + let seconds = Math.floor(secs - (days * (3600 * 24)) - (hours * 3600) - (minutes * 60)); - if (minutes < 10) {minutes = "0"+minutes;} - if (seconds < 10) {seconds = "0"+seconds;} + if (minutes < 10) { minutes = `0${minutes}`; } + if (seconds < 10) { seconds = `0${seconds}`; } return `${minutes}:${seconds}`; -} +}; + +const styles = StyleSheet.create({ + container: { + backgroundColor: 'rgba(255, 255, 255, .50)', + borderColor: 'rgba(255, 255, 255, 0)', + borderRadius: 10, + borderWidth: 0.5, + paddingLeft: 5, + paddingRight: 5, + }, + text: { + fontSize: 10, + }, +}); export default class CountDown extends Component { constructor(props) { super(props); this.state = { - seconds: 0 + seconds: 0, }; this.tick = this.tick.bind(this); } - componentDidMount() { + componentWillMount() { this.setState({ seconds: this.props.seconds }); this.interval = setInterval(this.tick, 1000); } @@ -52,16 +66,7 @@ export default class CountDown extends Component { } } -const styles = StyleSheet.create({ - container: { - backgroundColor: 'rgba(255, 255, 255, .50)', - borderColor: 'rgba(255, 255, 255, 0)', - borderRadius: 10, - borderWidth: 0.5, - paddingLeft: 5, - paddingRight: 5, - }, - text: { - fontSize: 10, - } -}); +CountDown.propTypes = { + seconds: PropTypes.number, + index: PropTypes.number, +}; diff --git a/app/fetch.js b/app/fetch.js index 39bfb2d..7cc3fcc 100755 --- a/app/fetch.js +++ b/app/fetch.js @@ -1,12 +1,13 @@ -import EventHorizon from 'react-native-event-horizon'; import { updatePokemon, setLoading } from './actions/map.actions.js'; -const parseData = (res) => res._bodyInit.type === 'text/html; charset=utf-8' && { pokemon: [] } || res.json(); +const parseData = (res) => ( + res._bodyInit.type === 'text/html; charset=utf-8' && { pokemon: [] } || res.json() +); const config = { method: 'GET', headers: { - 'Accept': 'application/json', + Accept: 'application/json', 'Content-Type': 'application/json', }, }; @@ -17,15 +18,15 @@ const fetchData = ({ jobId, latitude, longitude }) => { .then((res) => { console.log(res); return res; }) .then((res) => { if (res.jobStatus === 'in_progress') { - setTimeout(() => fetchData({ jobId, latitude, longitude }), 2000) + setTimeout(() => fetchData({ jobId, latitude, longitude }), 2000); } else if (res.jobStatus === 'unknown') { - setTimeout(() => fetchData({ jobId, latitude, longitude }), 30000) + setTimeout(() => fetchData({ jobId, latitude, longitude }), 30000); } else { - updatePokemon(res.pokemon) + updatePokemon(res.pokemon); } }) - .catch(e => console.log(e)) -} + .catch(e => console.log(e)); +}; export default ({ latitude, longitude }) => { console.log(latitude, longitude); @@ -34,5 +35,5 @@ export default ({ latitude, longitude }) => { .then(parseData) .then((res) => { console.log(res); return res; }) .then(({ jobId }) => setTimeout(() => fetchData({ jobId, latitude, longitude }), 2000)) - .catch(e => console.log(e)) + .catch(e => console.log(e)); }; diff --git a/app/fetching.js b/app/fetching.js index 809eb8e..008d7a3 100644 --- a/app/fetching.js +++ b/app/fetching.js @@ -1,4 +1,4 @@ -import React, { Component } from 'react'; +import React, { PropTypes, Component } from 'react'; import { View, Image, StyleSheet, Animated, Easing } from 'react-native'; import EventHorizon from 'react-native-event-horizon'; import { composeWithTracker } from 'react-komposer'; @@ -7,58 +7,71 @@ import normal from './assets/images/pokeballs/normal.png'; import great from './assets/images/pokeballs/great.png'; import ultra from './assets/images/pokeballs/ultra.png'; +const styles = StyleSheet.create({ + container: { + flex: 1, + position: 'absolute', + top: 30, + left: 40, + flexDirection: 'row', + }, +}); + class Fetching extends Component { constructor(props) { super(props); this.state = { normalA: new Animated.Value(0), greatA: new Animated.Value(0), - ultraA: new Animated.Value(0) - } + ultraA: new Animated.Value(0), + }; this.animate = this.animate.bind(this); } + componentDidMount() { + this.animate(); + } + animate() { this.state.normalA.setValue(0); this.state.greatA.setValue(0); this.state.ultraA.setValue(0); - const normal = Animated.timing( + // normal ball animation + const n = Animated.timing( this.state.normalA, { toValue: 360, duration: 600, - easing: Easing.inOut(Easing.ease) + easing: Easing.inOut(Easing.ease), } ); - const great = Animated.timing( + // great ball animation + const g = Animated.timing( this.state.greatA, { toValue: 360, duration: 600, - easing: Easing.inOut(Easing.ease) + easing: Easing.inOut(Easing.ease), } ); - const ultra = Animated.timing( + // ultra ball animation + const u = Animated.timing( this.state.ultraA, { toValue: 360, duration: 600, - easing: Easing.inOut(Easing.ease) + easing: Easing.inOut(Easing.ease), } ); - normal.start(() => great.start(() => ultra.start(() => this.animate())) ); - } - - componentDidMount() { - this.animate() + n.start(() => g.start(() => u.start(() => this.animate()))); } render() { - if(!this.props.loading) { + if (!this.props.loading) { return false; } return ( @@ -72,10 +85,10 @@ class Fetching extends Component { { rotate: this.state.normalA.interpolate({ inputRange: [0, 360], - outputRange: ['0deg', '360deg'] - }) + outputRange: ['0deg', '360deg'], + }), }, - ] + ], }} /> @@ -113,15 +126,9 @@ class Fetching extends Component { } } -const styles = StyleSheet.create({ - container: { - flex: 1, - position: 'absolute', - top: 30, - left: 10, - flexDirection: 'row' - }, -}); +Fetching.propTypes = { + loading: PropTypes.bool, +}; export default composeWithTracker((props, onData) => { const { loading } = EventHorizon.subscribe('map'); diff --git a/app/icon.js b/app/icon.js new file mode 100644 index 0000000..5893b4a --- /dev/null +++ b/app/icon.js @@ -0,0 +1,16 @@ +import React, { PropTypes } from 'react'; +import { Image, TouchableOpacity } from 'react-native'; + +const Icon = ({ styles, image, onPress }) => ( + + + +); + +Icon.propTypes = { + styles: PropTypes.object, + image: PropTypes.number, + onPress: PropTypes.func, +}; + +export default Icon; diff --git a/app/index.js b/app/index.js index dca9dd2..453ed29 100755 --- a/app/index.js +++ b/app/index.js @@ -1,2 +1,2 @@ import './stores/index'; -import './actions/index'; \ No newline at end of file +import './actions/index'; diff --git a/app/loading.js b/app/loading.js index 9f989bf..c40a15e 100755 --- a/app/loading.js +++ b/app/loading.js @@ -1,26 +1,22 @@ -import React from 'react' +import React from 'react'; import { View, Text, -} from 'react-native' +} from 'react-native'; -const Loading = () => { - return ( - - - Loading... - - - ) -} +const Loading = () => ( + + + Loading... + + +); -Loading.propTypes = {} -Loading.defaultProps = {} - -export default Loading \ No newline at end of file +export default Loading; diff --git a/app/main-layout.js b/app/main-layout.js deleted file mode 100755 index 8466ed8..0000000 --- a/app/main-layout.js +++ /dev/null @@ -1,35 +0,0 @@ -import React, { Component, } from 'react' -import { View, StyleSheet } from 'react-native' - -class MainLayout extends Component { - - static propTypes = {} - - static defaultProps = {} - - constructor(props) { - super(props) - this.state = {} - } - - render() { - return ( - {this.props.children} - ) - } -} - -const styles = StyleSheet.create({ - container: { - backgroundColor: '#F5FCFF', - position: 'absolute', - top: 0, - bottom: 0, - left: 0, - right: 0, - justifyContent: 'flex-end', - alignItems: 'center', - }, -}); - -export default MainLayout diff --git a/app/map.js b/app/map.js index 629989e..55d5efa 100755 --- a/app/map.js +++ b/app/map.js @@ -1,15 +1,54 @@ import React, { Component } from 'react'; -import { View, StyleSheet, Image, TouchableOpacity } from 'react-native'; -import MapView, { Marker } from 'react-native-maps'; +import { View, StyleSheet } from 'react-native'; +import MapView from 'react-native-maps'; import { composeWithTracker } from 'react-komposer'; import EventHorizon from 'react-native-event-horizon'; -import _ from 'lodash'; import Loading from './loading'; import { updateRegion } from './actions/map.actions'; -import { openMenu } from './actions/map.actions'; +import { toggleMenu } from './actions/menu.actions'; import PokeMarker from './pokemarker'; +import Icon from './icon'; import refreshIcon from './assets/images/icons/refresh.png'; import navigationIcon from './assets/images/icons/navigation.png'; +import menuIcon from './assets/images/icons/menu/menu.png'; + +const styles = StyleSheet.create({ + rc: { + position: 'absolute', + top: 30, + right: 15, + opacity: 0.5, + }, + refresh: { + width: 20, + height: 20, + }, + nc: { + position: 'absolute', + bottom: 20, + left: 10, + }, + navigation: { + width: 30, + height: 30, + }, + mc: { + position: 'absolute', + top: 30, + left: 10, + }, + menu: { + width: 20, + height: 20, + }, + container: { + flex: 1, + flexDirection: 'column', + }, + map: { + flex: 1, + }, +}); class Map extends Component { constructor(props) { @@ -19,7 +58,7 @@ class Map extends Component { latitude: 34.008824881138935, longitude: -118.49761247634888, }, - followsUserLocation: true, + followsUserLocation: false, }; this.toggleNavigation = this.toggleNavigation.bind(this); } @@ -48,36 +87,39 @@ class Map extends Component { render() { const { pokemon } = this.props; const { region, followsUserLocation } = this.state; + const navigationStyle = [ + styles.navigation, followsUserLocation && { opacity: 1 } || { opacity: 0.5 }, + ]; return ( this.setState({ region })} + onRegionChangeComplete={(r) => this.setState({ region: r })} followsUserLocation={followsUserLocation} showsUserLocation zoomEnabled > { - pokemon.map((pokemon, index) => ( - + pokemon.map((poke, index) => ( + )) } - updateRegion(this.state.region)} - style={styles.rc} - > - - - toggleMenu()} + styles={{ container: styles.mc, image: styles.menu }} + image={menuIcon} + /> + updateRegion(region)} + styles={{ container: styles.rc, image: styles.refresh }} + image={refreshIcon} + /> + this.toggleNavigation()} - style={styles.nc} - > - - + styles={{ container: styles.nc, image: navigationStyle }} + image={navigationIcon} + /> ); } @@ -85,38 +127,11 @@ class Map extends Component { Map.propTypes = { pokemon: React.PropTypes.array, -} - -Map.defaultProps = {} +}; -const styles = StyleSheet.create({ - rc: { - position: 'absolute', - top: 30, - right: 15, - opacity: 0.5, - }, - refresh: { - width: 20, - height: 20, - }, - nc: { - position: 'absolute', - bottom: 20, - left: 10, - }, - navigation: { - width: 30, - height: 30, - }, - container: { - flex: 1, - flexDirection: 'column' - }, - map: { - flex: 1, - } -}); +Map.defaultProps = { + pokemon: [], +}; const onPropsChange = (props, onData) => { const { pokemon } = EventHorizon.subscribe('map'); diff --git a/app/menu.js b/app/menu.js index 854fb1d..c08641f 100644 --- a/app/menu.js +++ b/app/menu.js @@ -1,29 +1,40 @@ -import React from 'react'; -import { View, Text } from 'react-native'; -import Drawer from 'react-native-side-menu' +import React, { PropTypes } from 'react'; +import { View, Text, StyleSheet } from 'react-native'; +import Drawer from 'react-native-side-menu'; import EventHorizon from 'react-native-event-horizon'; import { composeWithTracker } from 'react-komposer'; +import { setMenuState } from './actions/menu.actions'; import Loading from './loading'; -const MenuContent = () => ( - - Test + }, +}); + +const MenuContent = () => ( + + Coming soon... ); const Menu = ({ open, children }) => ( } > {children} ); +Menu.propTypes = { + open: PropTypes.bool, + children: PropTypes.any, +}; + const onPropsChange = (props, onData) => { console.log('menu props'); onData(null, EventHorizon.subscribe('menu')); diff --git a/app/pokeball.js b/app/pokeball.js index 4610cae..6e5390f 100644 --- a/app/pokeball.js +++ b/app/pokeball.js @@ -16,7 +16,7 @@ export default class Pokeball extends Component { { toValue: 360 * 20, duration: 600 * 20, - easing: Easing.inOut(Easing.ease) + easing: Easing.inOut(Easing.ease), } ).start(this.animate); } @@ -34,10 +34,10 @@ export default class Pokeball extends Component { { rotate: this.state.animation.interpolate({ inputRange: [0, 360], - outputRange: ['0deg', '360deg'] - }) + outputRange: ['0deg', '360deg'], + }), }, - ] + ], }} /> ); diff --git a/app/pokedex.js b/app/pokedex.js index 5a82a36..a05fb2c 100755 --- a/app/pokedex.js +++ b/app/pokedex.js @@ -1,317 +1,317 @@ const images = { - 1: require("./assets/images/1.png"), - 2: require("./assets/images/2.png"), - 3: require("./assets/images/3.png"), - 4: require("./assets/images/4.png"), - 5: require("./assets/images/5.png"), - 6: require("./assets/images/6.png"), - 7: require("./assets/images/7.png"), - 8: require("./assets/images/8.png"), - 9: require("./assets/images/9.png"), - 10: require("./assets/images/10.png"), - 11: require("./assets/images/11.png"), - 12: require("./assets/images/12.png"), - 13: require("./assets/images/13.png"), - 14: require("./assets/images/14.png"), - 15: require("./assets/images/15.png"), - 16: require("./assets/images/16.png"), - 17: require("./assets/images/17.png"), - 18: require("./assets/images/18.png"), - 19: require("./assets/images/19.png"), - 20: require("./assets/images/20.png"), - 21: require("./assets/images/21.png"), - 22: require("./assets/images/22.png"), - 23: require("./assets/images/23.png"), - 24: require("./assets/images/24.png"), - 25: require("./assets/images/25.png"), - 26: require("./assets/images/26.png"), - 27: require("./assets/images/27.png"), - 28: require("./assets/images/28.png"), - 29: require("./assets/images/29.png"), - 30: require("./assets/images/30.png"), - 31: require("./assets/images/31.png"), - 32: require("./assets/images/32.png"), - 33: require("./assets/images/33.png"), - 34: require("./assets/images/34.png"), - 35: require("./assets/images/35.png"), - 36: require("./assets/images/36.png"), - 37: require("./assets/images/37.png"), - 38: require("./assets/images/38.png"), - 39: require("./assets/images/39.png"), - 40: require("./assets/images/40.png"), - 41: require("./assets/images/41.png"), - 42: require("./assets/images/42.png"), - 43: require("./assets/images/43.png"), - 44: require("./assets/images/44.png"), - 45: require("./assets/images/45.png"), - 46: require("./assets/images/46.png"), - 47: require("./assets/images/47.png"), - 48: require("./assets/images/48.png"), - 49: require("./assets/images/49.png"), - 50: require("./assets/images/50.png"), - 51: require("./assets/images/51.png"), - 52: require("./assets/images/52.png"), - 53: require("./assets/images/53.png"), - 54: require("./assets/images/54.png"), - 55: require("./assets/images/55.png"), - 56: require("./assets/images/56.png"), - 57: require("./assets/images/57.png"), - 58: require("./assets/images/58.png"), - 59: require("./assets/images/59.png"), - 60: require("./assets/images/60.png"), - 61: require("./assets/images/61.png"), - 62: require("./assets/images/62.png"), - 63: require("./assets/images/63.png"), - 64: require("./assets/images/64.png"), - 65: require("./assets/images/65.png"), - 66: require("./assets/images/66.png"), - 67: require("./assets/images/67.png"), - 68: require("./assets/images/68.png"), - 69: require("./assets/images/69.png"), - 70: require("./assets/images/70.png"), - 71: require("./assets/images/71.png"), - 72: require("./assets/images/72.png"), - 73: require("./assets/images/73.png"), - 74: require("./assets/images/74.png"), - 75: require("./assets/images/75.png"), - 76: require("./assets/images/76.png"), - 77: require("./assets/images/77.png"), - 78: require("./assets/images/78.png"), - 79: require("./assets/images/79.png"), - 80: require("./assets/images/80.png"), - 81: require("./assets/images/81.png"), - 82: require("./assets/images/82.png"), - 83: require("./assets/images/83.png"), - 84: require("./assets/images/84.png"), - 85: require("./assets/images/85.png"), - 86: require("./assets/images/86.png"), - 87: require("./assets/images/87.png"), - 88: require("./assets/images/88.png"), - 89: require("./assets/images/89.png"), - 90: require("./assets/images/90.png"), - 91: require("./assets/images/91.png"), - 92: require("./assets/images/92.png"), - 93: require("./assets/images/93.png"), - 94: require("./assets/images/94.png"), - 95: require("./assets/images/95.png"), - 96: require("./assets/images/96.png"), - 97: require("./assets/images/97.png"), - 98: require("./assets/images/98.png"), - 99: require("./assets/images/99.png"), - 100: require("./assets/images/100.png"), - 101: require("./assets/images/101.png"), - 102: require("./assets/images/102.png"), - 103: require("./assets/images/103.png"), - 104: require("./assets/images/104.png"), - 105: require("./assets/images/105.png"), - 106: require("./assets/images/106.png"), - 107: require("./assets/images/107.png"), - 108: require("./assets/images/108.png"), - 109: require("./assets/images/109.png"), - 110: require("./assets/images/110.png"), - 111: require("./assets/images/111.png"), - 112: require("./assets/images/112.png"), - 113: require("./assets/images/113.png"), - 114: require("./assets/images/114.png"), - 115: require("./assets/images/115.png"), - 116: require("./assets/images/116.png"), - 117: require("./assets/images/117.png"), - 118: require("./assets/images/118.png"), - 119: require("./assets/images/119.png"), - 120: require("./assets/images/120.png"), - 121: require("./assets/images/121.png"), - 122: require("./assets/images/122.png"), - 123: require("./assets/images/123.png"), - 124: require("./assets/images/124.png"), - 125: require("./assets/images/125.png"), - 126: require("./assets/images/126.png"), - 127: require("./assets/images/127.png"), - 128: require("./assets/images/128.png"), - 129: require("./assets/images/129.png"), - 130: require("./assets/images/130.png"), - 131: require("./assets/images/131.png"), - 132: require("./assets/images/132.png"), - 133: require("./assets/images/133.png"), - 134: require("./assets/images/134.png"), - 135: require("./assets/images/135.png"), - 136: require("./assets/images/136.png"), - 137: require("./assets/images/137.png"), - 138: require("./assets/images/138.png"), - 139: require("./assets/images/139.png"), - 140: require("./assets/images/140.png"), - 141: require("./assets/images/141.png"), - 142: require("./assets/images/142.png"), - 143: require("./assets/images/143.png"), - 144: require("./assets/images/144.png"), - 145: require("./assets/images/145.png"), - 146: require("./assets/images/146.png"), - 147: require("./assets/images/147.png"), - 148: require("./assets/images/148.png"), - 149: require("./assets/images/149.png"), - 150: require("./assets/images/150.png"), + 1: require('./assets/images/1.png'), + 2: require('./assets/images/2.png'), + 3: require('./assets/images/3.png'), + 4: require('./assets/images/4.png'), + 5: require('./assets/images/5.png'), + 6: require('./assets/images/6.png'), + 7: require('./assets/images/7.png'), + 8: require('./assets/images/8.png'), + 9: require('./assets/images/9.png'), + 10: require('./assets/images/10.png'), + 11: require('./assets/images/11.png'), + 12: require('./assets/images/12.png'), + 13: require('./assets/images/13.png'), + 14: require('./assets/images/14.png'), + 15: require('./assets/images/15.png'), + 16: require('./assets/images/16.png'), + 17: require('./assets/images/17.png'), + 18: require('./assets/images/18.png'), + 19: require('./assets/images/19.png'), + 20: require('./assets/images/20.png'), + 21: require('./assets/images/21.png'), + 22: require('./assets/images/22.png'), + 23: require('./assets/images/23.png'), + 24: require('./assets/images/24.png'), + 25: require('./assets/images/25.png'), + 26: require('./assets/images/26.png'), + 27: require('./assets/images/27.png'), + 28: require('./assets/images/28.png'), + 29: require('./assets/images/29.png'), + 30: require('./assets/images/30.png'), + 31: require('./assets/images/31.png'), + 32: require('./assets/images/32.png'), + 33: require('./assets/images/33.png'), + 34: require('./assets/images/34.png'), + 35: require('./assets/images/35.png'), + 36: require('./assets/images/36.png'), + 37: require('./assets/images/37.png'), + 38: require('./assets/images/38.png'), + 39: require('./assets/images/39.png'), + 40: require('./assets/images/40.png'), + 41: require('./assets/images/41.png'), + 42: require('./assets/images/42.png'), + 43: require('./assets/images/43.png'), + 44: require('./assets/images/44.png'), + 45: require('./assets/images/45.png'), + 46: require('./assets/images/46.png'), + 47: require('./assets/images/47.png'), + 48: require('./assets/images/48.png'), + 49: require('./assets/images/49.png'), + 50: require('./assets/images/50.png'), + 51: require('./assets/images/51.png'), + 52: require('./assets/images/52.png'), + 53: require('./assets/images/53.png'), + 54: require('./assets/images/54.png'), + 55: require('./assets/images/55.png'), + 56: require('./assets/images/56.png'), + 57: require('./assets/images/57.png'), + 58: require('./assets/images/58.png'), + 59: require('./assets/images/59.png'), + 60: require('./assets/images/60.png'), + 61: require('./assets/images/61.png'), + 62: require('./assets/images/62.png'), + 63: require('./assets/images/63.png'), + 64: require('./assets/images/64.png'), + 65: require('./assets/images/65.png'), + 66: require('./assets/images/66.png'), + 67: require('./assets/images/67.png'), + 68: require('./assets/images/68.png'), + 69: require('./assets/images/69.png'), + 70: require('./assets/images/70.png'), + 71: require('./assets/images/71.png'), + 72: require('./assets/images/72.png'), + 73: require('./assets/images/73.png'), + 74: require('./assets/images/74.png'), + 75: require('./assets/images/75.png'), + 76: require('./assets/images/76.png'), + 77: require('./assets/images/77.png'), + 78: require('./assets/images/78.png'), + 79: require('./assets/images/79.png'), + 80: require('./assets/images/80.png'), + 81: require('./assets/images/81.png'), + 82: require('./assets/images/82.png'), + 83: require('./assets/images/83.png'), + 84: require('./assets/images/84.png'), + 85: require('./assets/images/85.png'), + 86: require('./assets/images/86.png'), + 87: require('./assets/images/87.png'), + 88: require('./assets/images/88.png'), + 89: require('./assets/images/89.png'), + 90: require('./assets/images/90.png'), + 91: require('./assets/images/91.png'), + 92: require('./assets/images/92.png'), + 93: require('./assets/images/93.png'), + 94: require('./assets/images/94.png'), + 95: require('./assets/images/95.png'), + 96: require('./assets/images/96.png'), + 97: require('./assets/images/97.png'), + 98: require('./assets/images/98.png'), + 99: require('./assets/images/99.png'), + 100: require('./assets/images/100.png'), + 101: require('./assets/images/101.png'), + 102: require('./assets/images/102.png'), + 103: require('./assets/images/103.png'), + 104: require('./assets/images/104.png'), + 105: require('./assets/images/105.png'), + 106: require('./assets/images/106.png'), + 107: require('./assets/images/107.png'), + 108: require('./assets/images/108.png'), + 109: require('./assets/images/109.png'), + 110: require('./assets/images/110.png'), + 111: require('./assets/images/111.png'), + 112: require('./assets/images/112.png'), + 113: require('./assets/images/113.png'), + 114: require('./assets/images/114.png'), + 115: require('./assets/images/115.png'), + 116: require('./assets/images/116.png'), + 117: require('./assets/images/117.png'), + 118: require('./assets/images/118.png'), + 119: require('./assets/images/119.png'), + 120: require('./assets/images/120.png'), + 121: require('./assets/images/121.png'), + 122: require('./assets/images/122.png'), + 123: require('./assets/images/123.png'), + 124: require('./assets/images/124.png'), + 125: require('./assets/images/125.png'), + 126: require('./assets/images/126.png'), + 127: require('./assets/images/127.png'), + 128: require('./assets/images/128.png'), + 129: require('./assets/images/129.png'), + 130: require('./assets/images/130.png'), + 131: require('./assets/images/131.png'), + 132: require('./assets/images/132.png'), + 133: require('./assets/images/133.png'), + 134: require('./assets/images/134.png'), + 135: require('./assets/images/135.png'), + 136: require('./assets/images/136.png'), + 137: require('./assets/images/137.png'), + 138: require('./assets/images/138.png'), + 139: require('./assets/images/139.png'), + 140: require('./assets/images/140.png'), + 141: require('./assets/images/141.png'), + 142: require('./assets/images/142.png'), + 143: require('./assets/images/143.png'), + 144: require('./assets/images/144.png'), + 145: require('./assets/images/145.png'), + 146: require('./assets/images/146.png'), + 147: require('./assets/images/147.png'), + 148: require('./assets/images/148.png'), + 149: require('./assets/images/149.png'), + 150: require('./assets/images/150.png'), }; const names = { - "1": "Bulbasaur", - "2": "Ivysaur", - "3": "Venusaur", - "4": "Charmander", - "5": "Charmeleon", - "6": "Charizard", - "7": "Squirtle", - "8": "Wartortle", - "9": "Blastoise", - "10": "Caterpie", - "11": "Metapod", - "12": "Butterfree", - "13": "Weedle", - "14": "Kakuna", - "15": "Beedrill", - "16": "Pidgey", - "17": "Pidgeotto", - "18": "Pidgeot", - "19": "Rattata", - "20": "Raticate", - "21": "Spearow", - "22": "Fearow", - "23": "Ekans", - "24": "Arbok", - "25": "Pikachu", - "26": "Raichu", - "27": "Sandshrew", - "28": "Sandslash", - "29": "Nidoran♀", - "30": "Nidorina", - "31": "Nidoqueen", - "32": "Nidoran♂", - "33": "Nidorino", - "34": "Nidoking", - "35": "Clefairy", - "36": "Clefable", - "37": "Vulpix", - "38": "Ninetales", - "39": "Jigglypuff", - "40": "Wigglytuff", - "41": "Zubat", - "42": "Golbat", - "43": "Oddish", - "44": "Gloom", - "45": "Vileplume", - "46": "Paras", - "47": "Parasect", - "48": "Venonat", - "49": "Venomoth", - "50": "Diglett", - "51": "Dugtrio", - "52": "Meowth", - "53": "Persian", - "54": "Psyduck", - "55": "Golduck", - "56": "Mankey", - "57": "Primeape", - "58": "Growlithe", - "59": "Arcanine", - "60": "Poliwag", - "61": "Poliwhirl", - "62": "Poliwrath", - "63": "Abra", - "64": "Kadabra", - "65": "Alakazam", - "66": "Machop", - "67": "Machoke", - "68": "Machamp", - "69": "Bellsprout", - "70": "Weepinbell", - "71": "Victreebel", - "72": "Tentacool", - "73": "Tentacruel", - "74": "Geodude", - "75": "Graveler", - "76": "Golem", - "77": "Ponyta", - "78": "Rapidash", - "79": "Slowpoke", - "80": "Slowbro", - "81": "Magnemite", - "82": "Magneton", - "83": "Farfetch'd", - "84": "Doduo", - "85": "Dodrio", - "86": "Seel", - "87": "Dewgong", - "88": "Grimer", - "89": "Muk", - "90": "Shellder", - "91": "Cloyster", - "92": "Gastly", - "93": "Haunter", - "94": "Gengar", - "95": "Onix", - "96": "Drowzee", - "97": "Hypno", - "98": "Krabby", - "99": "Kingler", - "100": "Voltorb", - "101": "Electrode", - "102": "Exeggcute", - "103": "Exeggutor", - "104": "Cubone", - "105": "Marowak", - "106": "Hitmonlee", - "107": "Hitmonchan", - "108": "Lickitung", - "109": "Koffing", - "110": "Weezing", - "111": "Rhyhorn", - "112": "Rhydon", - "113": "Chansey", - "114": "Tangela", - "115": "Kangaskhan", - "116": "Horsea", - "117": "Seadra", - "118": "Goldeen", - "119": "Seaking", - "120": "Staryu", - "121": "Starmie", - "122": "Mr. Mime", - "123": "Scyther", - "124": "Jynx", - "125": "Electabuzz", - "126": "Magmar", - "127": "Pinsir", - "128": "Tauros", - "129": "Magikarp", - "130": "Gyarados", - "131": "Lapras", - "132": "Ditto", - "133": "Eevee", - "134": "Vaporeon", - "135": "Jolteon", - "136": "Flareon", - "137": "Porygon", - "138": "Omanyte", - "139": "Omastar", - "140": "Kabuto", - "141": "Kabutops", - "142": "Aerodactyl", - "143": "Snorlax", - "144": "Articuno", - "145": "Zapdos", - "146": "Moltres", - "147": "Dratini", - "148": "Dragonair", - "149": "Dragonite", - "150": "Mewtwo", - "151": "Mew", + '1': 'Bulbasaur', + '2': 'Ivysaur', + '3': 'Venusaur', + '4': 'Charmander', + '5': 'Charmeleon', + '6': 'Charizard', + '7': 'Squirtle', + '8': 'Wartortle', + '9': 'Blastoise', + '10': 'Caterpie', + '11': 'Metapod', + '12': 'Butterfree', + '13': 'Weedle', + '14': 'Kakuna', + '15': 'Beedrill', + '16': 'Pidgey', + '17': 'Pidgeotto', + '18': 'Pidgeot', + '19': 'Rattata', + '20': 'Raticate', + '21': 'Spearow', + '22': 'Fearow', + '23': 'Ekans', + '24': 'Arbok', + '25': 'Pikachu', + '26': 'Raichu', + '27': 'Sandshrew', + '28': 'Sandslash', + '29': 'Nidoran♀', + '30': 'Nidorina', + '31': 'Nidoqueen', + '32': 'Nidoran♂', + '33': 'Nidorino', + '34': 'Nidoking', + '35': 'Clefairy', + '36': 'Clefable', + '37': 'Vulpix', + '38': 'Ninetales', + '39': 'Jigglypuff', + '40': 'Wigglytuff', + '41': 'Zubat', + '42': 'Golbat', + '43': 'Oddish', + '44': 'Gloom', + '45': 'Vileplume', + '46': 'Paras', + '47': 'Parasect', + '48': 'Venonat', + '49': 'Venomoth', + '50': 'Diglett', + '51': 'Dugtrio', + '52': 'Meowth', + '53': 'Persian', + '54': 'Psyduck', + '55': 'Golduck', + '56': 'Mankey', + '57': 'Primeape', + '58': 'Growlithe', + '59': 'Arcanine', + '60': 'Poliwag', + '61': 'Poliwhirl', + '62': 'Poliwrath', + '63': 'Abra', + '64': 'Kadabra', + '65': 'Alakazam', + '66': 'Machop', + '67': 'Machoke', + '68': 'Machamp', + '69': 'Bellsprout', + '70': 'Weepinbell', + '71': 'Victreebel', + '72': 'Tentacool', + '73': 'Tentacruel', + '74': 'Geodude', + '75': 'Graveler', + '76': 'Golem', + '77': 'Ponyta', + '78': 'Rapidash', + '79': 'Slowpoke', + '80': 'Slowbro', + '81': 'Magnemite', + '82': 'Magneton', + '83': "Farfetch'd", + '84': 'Doduo', + '85': 'Dodrio', + '86': 'Seel', + '87': 'Dewgong', + '88': 'Grimer', + '89': 'Muk', + '90': 'Shellder', + '91': 'Cloyster', + '92': 'Gastly', + '93': 'Haunter', + '94': 'Gengar', + '95': 'Onix', + '96': 'Drowzee', + '97': 'Hypno', + '98': 'Krabby', + '99': 'Kingler', + '100': 'Voltorb', + '101': 'Electrode', + '102': 'Exeggcute', + '103': 'Exeggutor', + '104': 'Cubone', + '105': 'Marowak', + '106': 'Hitmonlee', + '107': 'Hitmonchan', + '108': 'Lickitung', + '109': 'Koffing', + '110': 'Weezing', + '111': 'Rhyhorn', + '112': 'Rhydon', + '113': 'Chansey', + '114': 'Tangela', + '115': 'Kangaskhan', + '116': 'Horsea', + '117': 'Seadra', + '118': 'Goldeen', + '119': 'Seaking', + '120': 'Staryu', + '121': 'Starmie', + '122': 'Mr. Mime', + '123': 'Scyther', + '124': 'Jynx', + '125': 'Electabuzz', + '126': 'Magmar', + '127': 'Pinsir', + '128': 'Tauros', + '129': 'Magikarp', + '130': 'Gyarados', + '131': 'Lapras', + '132': 'Ditto', + '133': 'Eevee', + '134': 'Vaporeon', + '135': 'Jolteon', + '136': 'Flareon', + '137': 'Porygon', + '138': 'Omanyte', + '139': 'Omastar', + '140': 'Kabuto', + '141': 'Kabutops', + '142': 'Aerodactyl', + '143': 'Snorlax', + '144': 'Articuno', + '145': 'Zapdos', + '146': 'Moltres', + '147': 'Dratini', + '148': 'Dragonair', + '149': 'Dragonite', + '150': 'Mewtwo', + '151': 'Mew', }; const pokedex = {}; -for (let i = 1; i < 150; i++ ) { +for (let i = 1; i < 150; i++) { pokedex[i] = { name: names[i], image: images[i], }; } -export default (id) => pokedex[id]; \ No newline at end of file +export default (id) => pokedex[id]; diff --git a/app/pokemarker.js b/app/pokemarker.js index 7e06eed..4d300bb 100644 --- a/app/pokemarker.js +++ b/app/pokemarker.js @@ -1,13 +1,21 @@ -import React, { PropTypes, Component } from 'react'; -import { View, Image, Text, StyleSheet } from 'react-native'; +import React, { PropTypes } from 'react'; +import { View, Image, StyleSheet } from 'react-native'; import { Marker } from 'react-native-maps'; -import { viewPokemon } from './actions/modal.actions'; import CountDown from './countdown'; import getPokemon from './pokedex'; +const styles = StyleSheet.create({ + container: { + alignItems: 'center', + }, + image: { + + }, +}); + const PokeMarker = ({ latitude, longitude, pokemonId, expiration_time, index }) => { - const { name, image } = getPokemon(pokemonId); - const interval = -(new Date().getTime() - (expiration_time * 1000))/1000; + const { image } = getPokemon(pokemonId); + const interval = -(new Date().getTime() - (expiration_time * 1000)) / 1000; return ( @@ -19,16 +27,11 @@ const PokeMarker = ({ latitude, longitude, pokemonId, expiration_time, index }) }; PokeMarker.propTypes = { - image: PropTypes.number, -} - -const styles = StyleSheet.create({ - container: { - alignItems: 'center', - }, - image: { - - } -}); + latitude: PropTypes.number, + longitude: PropTypes.number, + pokemonId: PropTypes.number, + expiration_time: PropTypes.number, + index: PropTypes.number, +}; export default PokeMarker; diff --git a/app/pokeview.js b/app/pokeview.js index 1528f0b..672437d 100644 --- a/app/pokeview.js +++ b/app/pokeview.js @@ -9,9 +9,7 @@ const PokeModal = ({ open }) => ( animationType={"slide"} transparent={false} visible={open} - > - - + /> ); PokeModal.propTypes = { diff --git a/package.json b/package.json index d85107f..2eb5ae6 100644 --- a/package.json +++ b/package.json @@ -12,5 +12,31 @@ "react-native-event-horizon": "^1.0.1", "react-native-maps": "^0.7.1", "react-native-side-menu": "^0.20.0" + }, + "devDependencies": { + "eslint": "^2.8.0", + "eslint-config-airbnb": "^8.0.0", + "eslint-plugin-import": "^1.6.0", + "eslint-plugin-jsx-a11y": "^1.0.3", + "eslint-plugin-meteor": "^3.5.2", + "eslint-plugin-react": "^5.0.1", + "stylelint": "^6.5.1", + "stylelint-config-standard": "^8.0.0" + }, + "eslintConfig": { + "plugins": [ + "meteor" + ], + "extends": [ + "airbnb", + "plugin:meteor/guide" + ], + "rules": { + "import/no-unresolved": 0, + "func-names": 0 + }, + "globals": { + + } } } From 0c6f8a2a14c5017a0aa5bac628e0e9f8ba20e696 Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 30 Jul 2016 01:28:21 -0400 Subject: [PATCH 2/7] #4 Completed Global Timer --- app/actions/index.js | 2 + app/actions/location.actions.js | 10 +++ app/actions/map.actions.js | 23 +++---- app/actions/timer.actions.js | 32 ++++++++++ app/fetch.js | 23 ++++--- app/{ => icons}/icon.js | 0 app/icons/menu.icon.js | 25 ++++++++ app/icons/navigation.icon.js | 35 ++++++++++ app/icons/refresh.icon.js | 42 ++++++++++++ app/map.js | 110 +++++++++++--------------------- app/stores/index.js | 2 + app/stores/location.store.js | 12 ++++ app/stores/map.store.js | 5 +- app/stores/timer.store.js | 9 +++ 14 files changed, 229 insertions(+), 101 deletions(-) create mode 100644 app/actions/location.actions.js create mode 100644 app/actions/timer.actions.js rename app/{ => icons}/icon.js (100%) create mode 100644 app/icons/menu.icon.js create mode 100644 app/icons/navigation.icon.js create mode 100644 app/icons/refresh.icon.js create mode 100644 app/stores/location.store.js create mode 100644 app/stores/timer.store.js diff --git a/app/actions/index.js b/app/actions/index.js index 9939f77..d4472d6 100755 --- a/app/actions/index.js +++ b/app/actions/index.js @@ -1,3 +1,5 @@ import './map.actions'; import './modal.actions'; import './menu.actions'; +import './timer.actions'; +import './location.actions'; diff --git a/app/actions/location.actions.js b/app/actions/location.actions.js new file mode 100644 index 0000000..4daf674 --- /dev/null +++ b/app/actions/location.actions.js @@ -0,0 +1,10 @@ +import EventHorizon from 'react-native-event-horizon'; + +EventHorizon.createAction('location', 'UPDATE_LOCATION', (store, location, update) => { + update({ + latitude: location.latitude, + longitude: location.longitude, + }); +}); + +export default (region) => EventHorizon.dispatch('UPDATE_LOCATION', region); diff --git a/app/actions/map.actions.js b/app/actions/map.actions.js index 7c31a17..4234241 100755 --- a/app/actions/map.actions.js +++ b/app/actions/map.actions.js @@ -1,15 +1,4 @@ import EventHorizon from 'react-native-event-horizon'; -import fetchPokemon from '../fetch'; - -EventHorizon.createAction('map', 'UPDATE_MAP_REGION', (store, region, update) => { - if (region && region.latitude) { - update({ - location: region, - }); - } - - fetchPokemon(region || store.location); -}); EventHorizon.createAction('map', 'SET_MAP_LOADING', (store, data, update) => { update({ @@ -17,8 +6,14 @@ EventHorizon.createAction('map', 'SET_MAP_LOADING', (store, data, update) => { }); }); +EventHorizon.createAction('map', 'TOGGLE_MAP_TRACKING', (store, data, update) => { + console.log(store.track); + update({ + track: !store.track, + }); +}); + EventHorizon.createAction('map', 'UPDATE_MAP_POKEMON', (store, pokemon, update) => { - console.log(pokemon); update({ pokemon, loading: false, @@ -34,7 +29,7 @@ EventHorizon.createAction('map', 'REMOVE_MAP_POKEMON', (store, index, update) => }); }); -export const updateRegion = (region) => EventHorizon.dispatch('UPDATE_MAP_REGION', region); -export const setLoading = () => EventHorizon.dispatch('SET_MAP_LOADING', {}); +export const setLoading = () => EventHorizon.dispatch('SET_MAP_LOADING'); +export const toggleNavigation = () => EventHorizon.dispatch('TOGGLE_MAP_TRACKING'); export const updatePokemon = (pokemon) => EventHorizon.dispatch('UPDATE_MAP_POKEMON', pokemon); export const removePokemon = (index) => EventHorizon.dispatch('REMOVE_MAP_POKEMON', index); diff --git a/app/actions/timer.actions.js b/app/actions/timer.actions.js new file mode 100644 index 0000000..7ba886d --- /dev/null +++ b/app/actions/timer.actions.js @@ -0,0 +1,32 @@ +import EventHorizon from 'react-native-event-horizon'; +import defaultStore from '../stores/timer.store'; + +// create a timer variable so we can set and reset it +let timer = null; + +export const startTimer = () => EventHorizon.dispatch('TIMER_START'); +export const resetTimer = () => EventHorizon.dispatch('TIMER_RESET'); +export const decrementTimer = () => EventHorizon.dispatch('TIMER_DECREMENT'); + +EventHorizon.createAction('timer', 'TIMER_RESET', (store, data, update) => { + update(defaultStore); +}); + +EventHorizon.createAction('timer', 'TIMER_START', (store, data, update) => { + update({ + time: 30, + }); + // set the timer to an interval of 1 second to decrement the store + timer = setInterval(() => decrementTimer(), 1000); +}); + +EventHorizon.createAction('timer', 'TIMER_DECREMENT', (store, data, update) => { + if (store.time > 0) { + update({ + time: store.time - 1, + }); + } else if (timer) { + // clear the interval if the value is 0 + clearInterval(timer); + } +}); diff --git a/app/fetch.js b/app/fetch.js index 7cc3fcc..cff6a21 100755 --- a/app/fetch.js +++ b/app/fetch.js @@ -1,4 +1,6 @@ -import { updatePokemon, setLoading } from './actions/map.actions.js'; +import EventHorizon from 'react-native-event-horizon'; +import { updatePokemon, setLoading } from './actions/map.actions'; +import { startTimer } from './actions/timer.actions'; const parseData = (res) => ( res._bodyInit.type === 'text/html; charset=utf-8' && { pokemon: [] } || res.json() @@ -28,12 +30,15 @@ const fetchData = ({ jobId, latitude, longitude }) => { .catch(e => console.log(e)); }; -export default ({ latitude, longitude }) => { - console.log(latitude, longitude); - setLoading(); - fetch(`https://pokevision.com/map/scan/${latitude}/${longitude}`, config) - .then(parseData) - .then((res) => { console.log(res); return res; }) - .then(({ jobId }) => setTimeout(() => fetchData({ jobId, latitude, longitude }), 2000)) - .catch(e => console.log(e)); +export default () => { + const { latitude, longitude } = EventHorizon.subscribe('location'); + if (latitude && longitude) { + setLoading(); + startTimer(); + fetch(`https://pokevision.com/map/scan/${latitude}/${longitude}`, config) + .then(parseData) + .then((res) => { console.log(res); return res; }) + .then(({ jobId }) => setTimeout(() => fetchData({ jobId, latitude, longitude }), 2000)) + .catch(e => console.log(e)); + } }; diff --git a/app/icon.js b/app/icons/icon.js similarity index 100% rename from app/icon.js rename to app/icons/icon.js diff --git a/app/icons/menu.icon.js b/app/icons/menu.icon.js new file mode 100644 index 0000000..dbbbb62 --- /dev/null +++ b/app/icons/menu.icon.js @@ -0,0 +1,25 @@ +import React from 'react'; +import { StyleSheet } from 'react-native'; +import { toggleMenu } from '../actions/menu.actions'; +import Icon from './icon'; +import menuIcon from '../assets/images/icons/menu/menu.png'; + +const styles = StyleSheet.create({ + container: { + position: 'absolute', + top: 30, + left: 10, + }, + icon: { + width: 20, + height: 20, + }, +}); + +export default () => ( + toggleMenu()} + styles={{ container: styles.container, image: styles.icon }} + image={menuIcon} + /> +); diff --git a/app/icons/navigation.icon.js b/app/icons/navigation.icon.js new file mode 100644 index 0000000..b517702 --- /dev/null +++ b/app/icons/navigation.icon.js @@ -0,0 +1,35 @@ +import React, { PropTypes } from 'react'; +import { StyleSheet } from 'react-native'; +import { toggleNavigation } from '../actions/map.actions'; +import Icon from './icon'; +import navigationIcon from '../assets/images/icons/navigation.png'; + +const styles = StyleSheet.create({ + container: { + position: 'absolute', + bottom: 20, + left: 10, + }, + icon: { + width: 30, + height: 30, + }, +}); + +const getStyle = (track) => [ + styles.icon, track && { opacity: 1 } || { opacity: 0.5 }, +]; + +const NavigationIcon = ({ track }) => ( + toggleNavigation()} + styles={{ container: styles.container, image: getStyle(track) }} + image={navigationIcon} + /> +); + +NavigationIcon.propTypes = { + track: PropTypes.bool, +}; + +export default NavigationIcon; diff --git a/app/icons/refresh.icon.js b/app/icons/refresh.icon.js new file mode 100644 index 0000000..81abf9a --- /dev/null +++ b/app/icons/refresh.icon.js @@ -0,0 +1,42 @@ +import React from 'react'; +import { StyleSheet, Alert } from 'react-native'; +import EventHorizon from 'react-native-event-horizon'; +import fetchPokemon from '../fetch'; +import Icon from './icon'; +import refreshIcon from '../assets/images/icons/refresh.png'; + +const styles = StyleSheet.create({ + container: { + position: 'absolute', + top: 30, + right: 15, + opacity: 0.5, + }, + icon: { + width: 20, + height: 20, + }, +}); + +const triggerRefresh = () => { + const { time } = EventHorizon.subscribe('timer'); + if (time === 0) { + fetchPokemon(); + } else { + Alert.alert( + 'Please Wait', + `You still have ${time} seconds before you can refresh`, + [ + { text: 'OK' }, + ] + ); + } +}; + +export default () => ( + triggerRefresh()} + styles={{ container: styles.container, image: styles.icon }} + image={refreshIcon} + /> +); diff --git a/app/map.js b/app/map.js index 55d5efa..df4ad85 100755 --- a/app/map.js +++ b/app/map.js @@ -1,46 +1,17 @@ -import React, { Component } from 'react'; -import { View, StyleSheet } from 'react-native'; +import React, { Component, PropTypes } from 'react'; +import { View, StyleSheet, Alert } from 'react-native'; import MapView from 'react-native-maps'; import { composeWithTracker } from 'react-komposer'; import EventHorizon from 'react-native-event-horizon'; import Loading from './loading'; -import { updateRegion } from './actions/map.actions'; -import { toggleMenu } from './actions/menu.actions'; +import updateLocation from './actions/location.actions'; +import fetchPokemon from './fetch'; import PokeMarker from './pokemarker'; -import Icon from './icon'; -import refreshIcon from './assets/images/icons/refresh.png'; -import navigationIcon from './assets/images/icons/navigation.png'; -import menuIcon from './assets/images/icons/menu/menu.png'; +import RefeshIcon from './icons/refresh.icon'; +import MenuIcon from './icons/menu.icon'; +import NavigationIcon from './icons/navigation.icon'; const styles = StyleSheet.create({ - rc: { - position: 'absolute', - top: 30, - right: 15, - opacity: 0.5, - }, - refresh: { - width: 20, - height: 20, - }, - nc: { - position: 'absolute', - bottom: 20, - left: 10, - }, - navigation: { - width: 30, - height: 30, - }, - mc: { - position: 'absolute', - top: 30, - left: 10, - }, - menu: { - width: 20, - height: 20, - }, container: { flex: 1, flexDirection: 'column', @@ -53,26 +24,16 @@ const styles = StyleSheet.create({ class Map extends Component { constructor(props) { super(props); - this.state = { - region: { - latitude: 34.008824881138935, - longitude: -118.49761247634888, - }, - followsUserLocation: false, - }; this.toggleNavigation = this.toggleNavigation.bind(this); + this.triggerRefresh = this.triggerRefresh.bind(this); } componentDidMount() { - this.timer = setInterval(() => { - console.log('updating pokemon'); - updateRegion(this.state.region); - }, 60000); - updateRegion(this.state.region); + setTimeout(fetchPokemon, 3000); } componentWillUnmount() { - clearInterval(this.timer); + } /** @@ -84,18 +45,29 @@ class Map extends Component { }); } + triggerRefresh() { + const { time } = EventHorizon.subscribe('timer'); + if (time === 0) { + fetchPokemon(); + } else { + Alert.alert( + 'Please Wait', + `You still have ${time} seconds before you can refresh`, + [ + { text: 'OK' }, + ] + ); + } + } + render() { - const { pokemon } = this.props; - const { region, followsUserLocation } = this.state; - const navigationStyle = [ - styles.navigation, followsUserLocation && { opacity: 1 } || { opacity: 0.5 }, - ]; + const { pokemon, track } = this.props; return ( this.setState({ region: r })} - followsUserLocation={followsUserLocation} + onRegionChangeComplete={updateLocation} + followsUserLocation={track} showsUserLocation zoomEnabled > @@ -105,37 +77,27 @@ class Map extends Component { )) } - toggleMenu()} - styles={{ container: styles.mc, image: styles.menu }} - image={menuIcon} - /> - updateRegion(region)} - styles={{ container: styles.rc, image: styles.refresh }} - image={refreshIcon} - /> - this.toggleNavigation()} - styles={{ container: styles.nc, image: navigationStyle }} - image={navigationIcon} - /> + + + ); } } Map.propTypes = { - pokemon: React.PropTypes.array, + pokemon: PropTypes.array, + track: PropTypes.bool, }; Map.defaultProps = { pokemon: [], + track: true, }; const onPropsChange = (props, onData) => { - const { pokemon } = EventHorizon.subscribe('map'); - onData(null, { pokemon }); + const { pokemon, track } = EventHorizon.subscribe('map'); + onData(null, { pokemon, track }); }; export default composeWithTracker(onPropsChange, Loading, Loading)(Map); diff --git a/app/stores/index.js b/app/stores/index.js index c625546..4102602 100755 --- a/app/stores/index.js +++ b/app/stores/index.js @@ -1,3 +1,5 @@ import './map.store'; import './modal.store'; import './menu.store'; +import './timer.store'; +import './location.store'; diff --git a/app/stores/location.store.js b/app/stores/location.store.js new file mode 100644 index 0000000..84881d9 --- /dev/null +++ b/app/stores/location.store.js @@ -0,0 +1,12 @@ +import EventHorizon from 'react-native-event-horizon'; + +const defaultStore = { + location: { + latitude: 35.304251, + longitude: -80.964981, + }, +}; + +EventHorizon.createStore('location', defaultStore); + +export default defaultStore; diff --git a/app/stores/map.store.js b/app/stores/map.store.js index d44cd77..3adb884 100755 --- a/app/stores/map.store.js +++ b/app/stores/map.store.js @@ -1,12 +1,9 @@ import EventHorizon from 'react-native-event-horizon'; const defaultStore = { - location: { - latitude: 35.304251, - longitude: -80.964981, - }, pokemon: [], loading: false, + track: true, }; EventHorizon.createStore('map', defaultStore); diff --git a/app/stores/timer.store.js b/app/stores/timer.store.js new file mode 100644 index 0000000..5195a57 --- /dev/null +++ b/app/stores/timer.store.js @@ -0,0 +1,9 @@ +import EventHorizon from 'react-native-event-horizon'; + +const defaultStore = { + time: 0, +}; + +EventHorizon.createStore('timer', defaultStore); + +export default defaultStore; From e41920756ea56704670a3d2e10512f307e8a5cc1 Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 30 Jul 2016 01:33:11 -0400 Subject: [PATCH 3/7] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b08542f..99b039f 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` +## Image +![Image](https://cloud.githubusercontent.com/assets/7581369/17268331/5aed152e-55f5-11e6-8ef8-817c4271eb04.png) + From 8ef5f688653f1ab27a7c8c010e43e7ab20e20ff5 Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 30 Jul 2016 02:22:02 -0400 Subject: [PATCH 4/7] #7 Added List --- app/menu.js | 9 ++++++--- app/pokedex.js | 1 + app/pokemon-list-item.js | 39 +++++++++++++++++++++++++++++++++++++++ app/pokemon-list.js | 28 ++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 app/pokemon-list-item.js create mode 100644 app/pokemon-list.js diff --git a/app/menu.js b/app/menu.js index c08641f..0a8bbce 100644 --- a/app/menu.js +++ b/app/menu.js @@ -5,18 +5,21 @@ import EventHorizon from 'react-native-event-horizon'; import { composeWithTracker } from 'react-komposer'; import { setMenuState } from './actions/menu.actions'; import Loading from './loading'; +import PokemonList from './pokemon-list'; const styles = StyleSheet.create({ container: { flex: 1, - padding: 20, - backgroundColor: '#e2e2e2', + paddingLeft: 10, + paddingRight: 10, + paddingTop: 15, + backgroundColor: '#fff', }, }); const MenuContent = () => ( - Coming soon... + ); diff --git a/app/pokedex.js b/app/pokedex.js index a05fb2c..56277da 100755 --- a/app/pokedex.js +++ b/app/pokedex.js @@ -315,3 +315,4 @@ for (let i = 1; i < 150; i++) { } export default (id) => pokedex[id]; +export const getPokedex = () => pokedex; diff --git a/app/pokemon-list-item.js b/app/pokemon-list-item.js new file mode 100644 index 0000000..3e972fa --- /dev/null +++ b/app/pokemon-list-item.js @@ -0,0 +1,39 @@ +import React, { Component, PropTypes } from 'react'; +import { View, Text, Image, StyleSheet } from 'react-native'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + flexDirection: 'row', + paddingTop: 3, + paddingBottom: 3, + borderBottomColor: '#DADFE1', + borderBottomWidth: 1, + alignItems: 'center', + paddingLeft: 5, + }, + name: { + paddingLeft: 5, + }, +}); + +export default class ListItem extends Component { + shouldComponentUpdate() { + return true; + } + + render() { + const { name, image } = this.props; + return ( + + + {name} + + ); + } +} + +ListItem.propTypes = { + name: PropTypes.string, + image: PropTypes.number, +}; diff --git a/app/pokemon-list.js b/app/pokemon-list.js new file mode 100644 index 0000000..6cd4e48 --- /dev/null +++ b/app/pokemon-list.js @@ -0,0 +1,28 @@ +import React, { Component, PropTypes } from 'react'; +import { ScrollView } from 'react-native'; +import _ from 'lodash'; +import { getPokedex } from './pokedex'; +import PokemonListItem from './pokemon-list-item'; + +class PokemonList extends Component { + constructor(props) { + super(props); + this.state = { + pokedex: _.map(getPokedex(), (data, id) => ({ id, data })), + }; + } + + render() { + return ( + + { + this.state.pokedex.map(({ id, data }) => ( + + )) + } + + ); + } +} + +export default PokemonList; From b08edadeaaea53f1902507f4b65155dc4903cb30 Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 30 Jul 2016 13:49:26 -0400 Subject: [PATCH 5/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b08542f..8f80b7a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Pokélert is an Open Source Pokémon GO pokemon tracker. It uses the https://pokevision.com/ API to perform lookups. The Goal of this application is to provide background notifications of pokemon in your area. i.e Theres a Charazard 500m away! ## ToDo -- [ ] Finish Menu +- [x] Finish Menu - [ ] List Pokemon in menu and add filters - [ ] List Pokemon in menu and toggle tracking - [ ] Use pokemon API to pull up information about the pokemon when clicked @@ -13,7 +13,7 @@ Pokélert is an Open Source Pokémon GO pokemon tracker. It uses the https://pok ## Installation -To install this application you will need to have https://facebook.github.io/react-native/ installed you can follow there [getting started](https://facebook.github.io/react-native/docs/getting-started.html#content) guide. +To install this application you will need to have [React Native](https://facebook.github.io/react-native/) installed you can follow their [getting started](https://facebook.github.io/react-native/docs/getting-started.html#content) guide. ## Contributing From 9586034c3e06188b2e857b1befbe562e799777ec Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 30 Jul 2016 14:33:30 -0400 Subject: [PATCH 6/7] #7 Added Pokemon List --- app/menu.js | 2 +- app/pokemon-list-item.js | 12 +- ios/Project.xcodeproj/project.pbxproj | 765 ------------------ .../xcshareddata/xcschemes/Project.xcscheme | 112 --- ios/Project/AppDelegate.h | 16 - ios/Project/AppDelegate.m | 37 - ios/Project/Base.lproj/LaunchScreen.xib | 42 - .../AppIcon.appiconset/Contents.json | 38 - ios/Project/Info.plist | 54 -- ios/Project/main.m | 18 - ios/ProjectTests/Info.plist | 24 - ios/ProjectTests/ProjectTests.m | 70 -- 12 files changed, 8 insertions(+), 1182 deletions(-) delete mode 100644 ios/Project.xcodeproj/project.pbxproj delete mode 100644 ios/Project.xcodeproj/xcshareddata/xcschemes/Project.xcscheme delete mode 100644 ios/Project/AppDelegate.h delete mode 100644 ios/Project/AppDelegate.m delete mode 100644 ios/Project/Base.lproj/LaunchScreen.xib delete mode 100644 ios/Project/Images.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 ios/Project/Info.plist delete mode 100644 ios/Project/main.m delete mode 100644 ios/ProjectTests/Info.plist delete mode 100644 ios/ProjectTests/ProjectTests.m diff --git a/app/menu.js b/app/menu.js index 0a8bbce..50bcd9f 100644 --- a/app/menu.js +++ b/app/menu.js @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { View, Text, StyleSheet } from 'react-native'; +import { View, StyleSheet } from 'react-native'; import Drawer from 'react-native-side-menu'; import EventHorizon from 'react-native-event-horizon'; import { composeWithTracker } from 'react-komposer'; diff --git a/app/pokemon-list-item.js b/app/pokemon-list-item.js index 3e972fa..db89b14 100644 --- a/app/pokemon-list-item.js +++ b/app/pokemon-list-item.js @@ -1,5 +1,5 @@ import React, { Component, PropTypes } from 'react'; -import { View, Text, Image, StyleSheet } from 'react-native'; +import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native'; const styles = StyleSheet.create({ container: { @@ -25,10 +25,12 @@ export default class ListItem extends Component { render() { const { name, image } = this.props; return ( - - - {name} - + + + + {name} + + ); } } diff --git a/ios/Project.xcodeproj/project.pbxproj b/ios/Project.xcodeproj/project.pbxproj deleted file mode 100644 index 4e17e10..0000000 --- a/ios/Project.xcodeproj/project.pbxproj +++ /dev/null @@ -1,765 +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 /* ProjectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ProjectTests.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 */; }; - 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 = Project; - }; - 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; - }; - 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; name = main.jsbundle; 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 /* ProjectTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ProjectTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* ProjectTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ProjectTests.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 /* Project.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Project.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Project/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Project/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 = Project/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Project/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Project/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.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 */, - 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; - }; -/* 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 */, - ); - name = Products; - sourceTree = ""; - }; - 00C302D41ABCB9D200DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302E01ABCB9EE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, - ); - name = Products; - sourceTree = ""; - }; - 00E356EF1AD99517003FC87E /* ProjectTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* ProjectTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = ProjectTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 139105B71AF99BAD00B5F7CC /* Products */ = { - isa = PBXGroup; - children = ( - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, - ); - name = Products; - sourceTree = ""; - }; - 139FDEE71B06529A00C62182 /* Products */ = { - isa = PBXGroup; - children = ( - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, - ); - name = Products; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* Project */ = { - 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 = Project; - sourceTree = ""; - }; - 146834001AC3E56700842450 /* Products */ = { - isa = PBXGroup; - children = ( - 146834041AC3E56700842450 /* libReact.a */, - ); - name = Products; - sourceTree = ""; - }; - 78C398B11ACF4ADC00677621 /* Products */ = { - isa = PBXGroup; - children = ( - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, - ); - name = Products; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - 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 */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* Project */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* ProjectTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* Project.app */, - 00E356EE1AD99517003FC87E /* ProjectTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* ProjectTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ProjectTests" */; - buildPhases = ( - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = ProjectTests; - productName = ProjectTests; - productReference = 00E356EE1AD99517003FC87E /* ProjectTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 13B07F861A680F5B00A75B9A /* Project */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Project" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Project; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* Project.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = Facebook; - TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Project" */; - 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 = 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 /* Project */, - 00E356ED1AD99517003FC87E /* ProjectTests */, - ); - }; -/* 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; - }; - 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; - }; -/* 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/packager/react-native-xcode.sh"; - showEnvVarsInLog = 1; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* ProjectTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* Project */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = Project; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ProjectTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Project.app/Project"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = ProjectTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Project.app/Project"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEAD_CODE_STRIPPING = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - INFOPLIST_FILE = "Project/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = Project; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - INFOPLIST_FILE = "Project/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = Project; - }; - 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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 7.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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 7.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 "ProjectTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Project" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Project" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/ios/Project.xcodeproj/xcshareddata/xcschemes/Project.xcscheme b/ios/Project.xcodeproj/xcshareddata/xcschemes/Project.xcscheme deleted file mode 100644 index 91744a1..0000000 --- a/ios/Project.xcodeproj/xcshareddata/xcschemes/Project.xcscheme +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Project/AppDelegate.h b/ios/Project/AppDelegate.h deleted file mode 100644 index a9654d5..0000000 --- a/ios/Project/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/ios/Project/AppDelegate.m b/ios/Project/AppDelegate.m deleted file mode 100644 index 4cd98c4..0000000 --- a/ios/Project/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 "RCTBundleURLProvider.h" -#import "RCTRootView.h" - -@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:@"Project" - 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/ios/Project/Base.lproj/LaunchScreen.xib b/ios/Project/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 76ca9db..0000000 --- a/ios/Project/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Project/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/Project/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f..0000000 --- a/ios/Project/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/ios/Project/Info.plist b/ios/Project/Info.plist deleted file mode 100644 index e98ebb0..0000000 --- a/ios/Project/Info.plist +++ /dev/null @@ -1,54 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSExceptionDomains - - localhost - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/ios/Project/main.m b/ios/Project/main.m deleted file mode 100644 index 3d767fc..0000000 --- a/ios/Project/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/ios/ProjectTests/Info.plist b/ios/ProjectTests/Info.plist deleted file mode 100644 index 886825c..0000000 --- a/ios/ProjectTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/ios/ProjectTests/ProjectTests.m b/ios/ProjectTests/ProjectTests.m deleted file mode 100644 index 05b3ae4..0000000 --- a/ios/ProjectTests/ProjectTests.m +++ /dev/null @@ -1,70 +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 - -#import "RCTLog.h" -#import "RCTRootView.h" - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" - -@interface ProjectTests : XCTestCase - -@end - -@implementation ProjectTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; - RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - - RCTSetLogFunction(RCTDefaultLogFunction); - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - - -@end From 774783d3ceb5cfbe0a285e9134ad6c97a1359af2 Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 30 Jul 2016 14:37:18 -0400 Subject: [PATCH 7/7] Update README.md Updating for new version --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ac8e35f..a4f7d50 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,11 @@ Pokélert is an Open Source Pokémon GO pokemon tracker. It uses the https://pok ## ToDo - [x] Finish Menu -- [ ] List Pokemon in menu and add filters -- [ ] List Pokemon in menu and toggle tracking +- [x] List Pokemon in menu +- [ ] List Pokemon in menu and toggle filter - [ ] Use pokemon API to pull up information about the pokemon when clicked -- [ ] Add Map Markers +- [x] Add Map Markers +- [ ] Add Map Callouts - [ ] Add Background GeoLocation Services - [ ] Notifiy use when pokemon they want are near - [ ] Add local storage to store user filters and tracking @@ -25,7 +26,7 @@ To install this application you will need to have [React Native](https://faceboo ## History -version 0.0.1 +Version 0.0.2 ## Credits