Failed attempt to integrate ViroReact with CocoaPods

This commit is contained in:
John Lyon-Smith
2018-03-17 09:53:08 -07:00
parent c91fbaa98a
commit 77d92f3b7b
16 changed files with 1536 additions and 721 deletions

View File

@@ -3,7 +3,15 @@ import io from 'socket.io-client'
import { AsyncStorage } from 'react-native'
const authTokenName = 'AuthToken'
const apiURL = 'http://localhost:3000'
let apiURL
if (__DEV__) {
const localIPAddr = process.env.LOCAL_IP_ADDR
apiURL = `http://${localIPAddr || 'localhost'}:3000`
} else {
apiURL = 'https://dar.kss.us.com/api'
}
class NetworkError extends Error {
constructor(message) {

View File

View File

@@ -1,10 +1,12 @@
import { Home } from './Home'
import { Login } from './Login'
import { Error } from './Error'
import { View } from './Viewer'
import { Navigation } from 'react-native-navigation'
export function registerScreens() {
Navigation.registerComponent('app.Home', () => Home)
Navigation.registerComponent('app.Login', () => Login)
Navigation.registerComponent('app.Viewer', () => Viewer)
Navigation.registerComponent('app.Error', () => Error)
}